Refactor errors in applyRedirects to use common throwError function

refactor(router): Refactor errors in applyRedirects to use common throwError function (#45170)
Refactor errors in applyRedirects to use common throwError functionrefactorrefactor errors applyredirects use common throwerror

Committed by atscott

commit message
refactor(router): Refactor errors in applyRedirects to use common throwError function (#45170)

The implementation of `throwError` in `rxjs` is identical to what is
done manually in the Router code.
 
PR Close #45170

Editor assessment

The subject states the substitution — router errors in `applyRedirects` now use the common `throwError` function — though the doubled wording (`refactor ... Refactor`) is redundant. The body supplies the equivalence argument that justifies it: rxjs's `throwError` implementation is identical to what the router code did manually. That is the essential safety rationale for the swap. Type `refactor` and scope `router` are accurate. The `PR Close #45170` footer is well formed. Style is otherwise clean — imperative-compatible, no trailing period, no junk — with the capitalized subject start permitted. Clear and publishable, with the verbal redundancy as the main nit.

Browse categories

More refactor examples · Back to search