pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/angular/angular/pull/67871

//github.githubassets.com/assets/actions-26401580c700f528.css" /> fix(http): gracefully handle HTTP requests on destroyed injectors by arturovt · Pull Request #67871 · angular/angular · GitHub
Skip to content

fix(http): gracefully handle HTTP requests on destroyed injectors#67871

Open
arturovt wants to merge 1 commit intoangular:mainfrom
arturovt:fix/http-handle-destroyed-injector
Open

fix(http): gracefully handle HTTP requests on destroyed injectors#67871
arturovt wants to merge 1 commit intoangular:mainfrom
arturovt:fix/http-handle-destroyed-injector

Conversation

@arturovt
Copy link
Copy Markdown
Contributor

Previously, initiating an HTTP request after the injector has been
destroyed (e.g. during SSR teardown) would throw NG0205, resulting
in an unactionable error in production monitoring tools where
minified stack traces provide no useful context.

Instead, return EMPTY and emit a dev-mode warning (NG-2824) that
includes the request URL, making the issue immediately actionable
during development while keeping production stable and monitoring
clean.

NOTE: alternatively, instead of returning EMPTY, we could throw a
new dedicated RuntimeError (NG2824) that includes the request URL.
This would preserve the "loud failure" semantics while making the
error actionable in production monitoring — the URL survives
minification since it is a runtime string, not a symbol.

Previously, initiating an HTTP request after the injector has been
destroyed (e.g. during SSR teardown) would throw NG0205, resulting
in an unactionable error in production monitoring tools where
minified stack traces provide no useful context.

Instead, return EMPTY and emit a dev-mode warning (NG-2824) that
includes the request URL, making the issue immediately actionable
during development while keeping production stable and monitoring
clean.

NOTE: alternatively, instead of returning EMPTY, we could throw a
new dedicated RuntimeError (NG2824) that includes the request URL.
This would preserve the "loud failure" semantics while making the
error actionable in production monitoring — the URL survives
minification since it is a runtime string, not a symbol.
@pullapprove pullapprove bot requested a review from thePunderWoman March 25, 2026 23:47
@angular-robot angular-robot bot added the area: common/http Issues related to HTTP and HTTP Client label Mar 25, 2026
@ngbot ngbot bot added this to the Backlog milestone Mar 25, 2026
@thePunderWoman
Copy link
Copy Markdown
Contributor

@arturovt I'm a bit unclear on what's happening in your situation here. There's no issue and no repro so it's a bit difficult to understand the need, and since we've never seen any reports of this being a problem, I'm hesitant to just add this. Can you create an issue with a repro and link that here? I'd like to see what the actual issue and experience is, which will inform reviewing this PR.

@JeanMeche
Copy link
Copy Markdown
Member

Isn't there a larger issue at stake here ? It feels like the issue you had could happen with other services, not only the HttpClient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: common/http Issues related to HTTP and HTTP Client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy