angular/packages/common/http/src
Sebastian Barfurth 1b73c23597 fix(http): propagate plain errors when parsing fails (#62765)
The fetch backend now propagates the plain body when parsing the body fails.
This replicates the behavior of the XHR backend introduced in #19773.

The current state completely obfuscates errors of the "wrong" response type.
However, it's not uncommon for successful requests to return one type and
errors to return another type. Propagating the plain error allows downstream
error consumers to reason about the error body and decide how to parse it
depending on application needs.

PR Close #62765
2025-07-24 09:23:24 +00:00
..
backend.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
client.ts fix(http): Add missing timeout and transferCache options to HttpClient (#62586) 2025-07-14 15:45:25 -07:00
context.ts docs: set syntax highlighting of code examples MD code blocks (#59026) 2024-12-04 17:30:28 +01:00
errors.ts refactor(http): use RuntimeError for invalid timeout error (#62490) 2025-07-11 10:38:56 -07:00
fetch.ts fix(http): propagate plain errors when parsing fails (#62765) 2025-07-24 09:23:24 +00:00
headers.ts refactor(core): remove TODOs referencing #24571 (#60648) 2025-03-31 20:24:29 +00:00
interceptor.ts refactor(common): use ngServerMode in HttpInterceptorHandler (#61605) 2025-06-04 14:13:15 -04:00
jsonp.ts refactor(common): convert scripts within packages/common to relative imports (#60623) 2025-04-01 15:58:51 +00:00
module.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
params.ts refactor(common): drop error message in production (#59471) 2025-01-15 12:28:29 -05:00
private_export.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
provider.ts docs(docs-infra): Add version of introduction for APIs (#60814) 2025-05-02 07:51:33 -07:00
request.ts refactor(http): use RuntimeError for invalid timeout error (#62490) 2025-07-11 10:38:56 -07:00
resource.ts feat(http): add referrer & integrity support for fetch requests in httpResource (#62461) 2025-07-14 11:40:54 -07:00
resource_api.ts feat(http): add referrer & integrity support for fetch requests in httpResource (#62461) 2025-07-14 11:40:54 -07:00
response.ts refactor(core): remove TODOs referencing #24571 (#60648) 2025-03-31 20:24:29 +00:00
transfer_cache.ts refactor(common): move ngServerMode check outside tap() to enable tree-shaking (#62238) 2025-06-25 11:13:21 +00:00
xhr.ts fix(http): do not display warnings Angular detected that a HttpClient request with the keepalive option was sent using XHR when option is not true (#62536) 2025-07-09 12:45:27 -07:00
xsrf.ts refactor(common): drop platform checks in HttpXsrfCookieExtractor (#59810) 2025-05-01 08:41:10 -07:00