Wraps router.go() with error handling, since router.go() itself can
throw (e.g. no history entry to go to).
Generalizes three divergent copies found in the audit: luv-autoq-frontend's
(silently swallows the error), and ama-deep's/data-sheet-portal's
(identical - log + redirect to a hardcoded error route). See
UseRouterGoOptions.onError to opt into logging/redirecting yourself.
Wraps
router.go()with error handling, sincerouter.go()itself can throw (e.g. no history entry to go to).Generalizes three divergent copies found in the audit:
luv-autoq-frontend's (silently swallows the error), andama-deep's/data-sheet-portal's (identical - log + redirect to a hardcoded error route). SeeUseRouterGoOptions.onErrorto opt into logging/redirecting yourself.