Start here. This is the direct spoken answer to practice first.
Overview
When request inputs change, completion order is not guaranteed to match request order.
For a search or route-driven request, I model the changing input as a stream and use latest-request semantics such as switchMap, which unsubscribes from the previous HttpClient request when a newer input arrives. I keep loading, success, empty, and error states tied to the active request. If cancellation is not possible, I compare request identity before applying a result.