Skip to content

Commit

Permalink
Rephrase documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
wartab committed Oct 24, 2024
1 parent b8a1524 commit f587e1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adev/src/content/guide/http/making-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ There are three ways an HTTP request can fail:
* A request didn't respond in time when the timeout option was set.
* The backend can receive the request but fail to process it, and return an error response.

`HttpClient` captures both kinds of errors in an `HttpErrorResponse` which it returns through the `Observable`'s error channel. Network and timeout errors have a `status` code of `0` and an `error` which is an instance of [`ProgressEvent`](https://developer.mozilla.org/docs/Web/API/ProgressEvent). Backend errors have the failing `status` code returned by the backend, and the error response as the `error`. Inspect the response to identify the error's cause and the appropriate action to handle the error.
`HttpClient` captures all of the above kinds of errors in an `HttpErrorResponse` which it returns through the `Observable`'s error channel. Network and timeout errors have a `status` code of `0` and an `error` which is an instance of [`ProgressEvent`](https://developer.mozilla.org/docs/Web/API/ProgressEvent). Backend errors have the failing `status` code returned by the backend, and the error response as the `error`. Inspect the response to identify the error's cause and the appropriate action to handle the error.

The [RxJS library](https://rxjs.dev/) offers several operators which can be useful for error handling.

Expand Down

0 comments on commit f587e1f

Please sign in to comment.