René's URL Explorer Experiment


Title: Router error boundaries: a reused RedirectCommand instance only redirects the first time · Issue #72027 · angular/angular · GitHub

Open Graph Title: Router error boundaries: a reused RedirectCommand instance only redirects the first time · Issue #72027 · angular/angular

X Title: Router error boundaries: a reused RedirectCommand instance only redirects the first time · Issue #72027 · angular/angular

Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No (new in 22.3.0-rc.0: route error boundaries) Description With withErrorBoundaries(), throwing a RedirectCommand from a routed component is supposed to...

Open Graph Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No (new in 22.3.0-rc.0: route error boundaries) Description With withErrorBoundaries(), throwing a RedirectComman...

X Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No (new in 22.3.0-rc.0: route error boundaries) Description With withErrorBoundaries(), throwing a RedirectComman...

Opengraph URL: https://github.com/angular/angular/issues/72027

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Router error boundaries: a reused RedirectCommand instance only redirects the first time","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nrouter\n\n### Is this a regression?\n\nNo (new in 22.3.0-rc.0: route error boundaries)\n\n### Description\n\nWith `withErrorBoundaries()`, throwing a `RedirectCommand` from a routed component is supposed to always navigate (see `packages/router/docs/error_boundaries.md`, \"The Rule: `RedirectCommand` Always Navigates\").\n\nTo avoid dispatching the same redirect several times while it bubbles through nested outlets, `triggerRedirectIfCommand` in `router_error_boundary.ts` tags the `RedirectCommand` object itself with a `REDIRECT_DISPATCHED` symbol and skips the navigation if the tag is already set. The tag is never cleared, so if the same `RedirectCommand` **instance** is thrown again later (a module-level constant, a field on a service, a cached value), the router no longer navigates. The user stays on the failing route with the error component rendered.\n\n### Minimal reproduction\n\n```ts\nconst toLogin = new RedirectCommand(router.parseUrl('/login')); // created once and reused\n\n@Component({template: 'A'})\nclass Guarded {\n  constructor() {\n    throw toLogin;\n  }\n}\n\nprovideRouter(\n  [\n    {path: '', component: Home},\n    {path: 'a', component: Guarded},\n    {path: 'login', component: Login},\n  ],\n  withErrorBoundaries({defaultErrorComponent: ErrorCmp}),\n);\n\nawait router.navigateByUrl('/a'); // -> /login (correct)\nawait router.navigateByUrl('/');\nawait router.navigateByUrl('/a'); // expected /login, but the router stays on /a and renders ErrorCmp\n```\n\nConfirmed on `@angular/router@22.3.0-rc.0`. The relevant code on `main` has not changed since the feature landed.\n\n### Expected\n\nEvery time a `RedirectCommand` is thrown from a routed component the router navigates, regardless of whether the instance was thrown before. De-duplication should only apply to the same occurrence bubbling through several outlets.\n\n### Notes / possible directions\n\n- Workaround: always throw a new `RedirectCommand`.\n- The de-duplication could be scoped to one bubbling pass instead of the lifetime of the instance, for example by clearing the mark in a microtask after it is set, or by tracking dispatched commands in a `WeakSet` that is reset when the navigation that rendered the failing outlet ends.\n- Writing a symbol property onto a user-supplied object also throws in strict mode if that object is frozen; a `WeakSet` would avoid that as well.\n\nHappy to send a PR if the direction is agreed.\n\n### Angular version\n\n22.3.0-rc.0 and `main`\n","author":{"url":"https://github.com/mojerf","@type":"Person","name":"mojerf"},"datePublished":"2026-11-13T12:25:16Z","url":"https://github.com/angular/angular/issues/72027"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ff3b7717-d564-e268-9abc-e861ddc40177
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD25E:31D532:F82748:149DA0E:6B01DBAD
html-safe-nonce53904552f70c2bb8431752d9212934334b9f5fa9d553bcb115edcb4259b94cb0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjVFOjMxRDUzMjpGODI3NDg6MTQ5REEwRTo2QjAxREJBRCIsInZpc2l0b3JfaWQiOiI3MzUxNzg5MTA1NDAwODk2NDI5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacebc792bed7e712e1cf698cc8cff5ae5e27458fe054ec896ad3e20da20ec6090f
hovercard-subject-tagissue:6371196437
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/72027/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4f92c9d60c40a46b43e1e2054ea775705b478611967fb7618b8558838c151386/angular/angular/issues/72027
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4f92c9d60c40a46b43e1e2054ea775705b478611967fb7618b8558838c151386/angular/angular/issues/72027
og:image:altWhich @angular/* package(s) are the source of the bug? router Is this a regression? No (new in 22.3.0-rc.0: route error boundaries) Description With withErrorBoundaries(), throwing a RedirectComman...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemojerf
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/angular/angular git https://github.com/angular/angular.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id24195339
octolytics-dimension-repository_nwoangular/angular
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24195339
octolytics-dimension-repository_network_root_nwoangular/angular
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular/issues/72027#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F72027
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F72027
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular
Reloadhttps://github.com/angular/angular/issues/72027
Reloadhttps://github.com/angular/angular/issues/72027
Reloadhttps://github.com/angular/angular/issues/72027
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues835 (835)https://github.com/angular/angular/issues
Pull requests142 (142)https://github.com/angular/angular/pulls
Discussionshttps://github.com/angular/angular/discussions
Actionshttps://github.com/angular/angular/actions
Projectshttps://github.com/angular/angular/projects
Security and quality40 (40)https://github.com/angular/angular/security
Insightshttps://github.com/angular/angular/insights
https://github.com/angular/angular
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/72027
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/72027
Router error boundaries: a reused RedirectCommand instance only redirects the first timehttps://github.com/angular/angular/issues/72027#top
area: routerhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20router%22
open for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).https://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22open%20for%20contributions%22
needsTriagehttps://github.com/angular/angular/milestone/83
https://github.com/mojerf
mojerfhttps://github.com/mojerf
on Nov 13, 2026https://github.com/angular/angular/issues/72027#issue-6371196437
angular-robothttps://github.com/apps/angular-robot
area: routerhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20router%22
on Nov 13, 2026https://github.com/angular/angular/issues/72027#event-36026968846
angular-robothttps://github.com/apps/angular-robot
needsTriagehttps://github.com/angular/angular/milestone/83
on Nov 13, 2026https://github.com/angular/angular/issues/72027#event-36026975392
ngbothttps://github.com/apps/ngbot
needsTriagehttps://github.com/angular/angular/milestone/83
on Nov 13, 2026https://github.com/angular/angular/issues/72027#event-36026978091
https://github.com/atscott
atscotthttps://github.com/atscott
on Nov 13, 2026https://github.com/angular/angular/issues/72027#issuecomment-6857969714
atscotthttps://github.com/atscott
open for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).https://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22open%20for%20contributions%22
on Nov 13, 2026https://github.com/angular/angular/issues/72027#event-36046695255
mojerfhttps://github.com/mojerf
on Nov 17, 2026https://github.com/angular/angular/issues/72027#event-36459318441
fix(router): navigate every time a RedirectCommand is thrown from an …https://github.com/mojerf/angular/commit/8a2eda5a7bfe555233ce405897065c4b695cca5d
https://docs.github.com/articles/closing-issues-via-commit-messages
8a2eda5https://github.com/mojerf/angular/commit/8a2eda5a7bfe555233ce405897065c4b695cca5d
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular/issues/72027
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular/issues/72027
area: routerhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20router%22
open for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).https://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22open%20for%20contributions%22
needsTriageNo due datehttps://github.com/angular/angular/milestone/83
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.