@polargold/pg-frontend-vue
    Preparing search index...

    Function useRouterPush

    • Wraps router.push() with error handling, since a rejected navigation (e.g. a guard redirect, an invalid route) otherwise surfaces as an unhandled promise rejection.

      Generalizes three copies found in the audit: ama-deep's and data-sheet-portal's (byte-identical - log + fall back to a hardcoded 404 route) and luv-autoq-frontend's (same, plus Sentry.captureException). See UseRouterPushOptions.onError to opt into logging/fallback-navigation/ error-reporting yourself. Used internally by useRoutePermission for its own permission-redirects.

      Parameters

      Returns {
          routerPush: (
              to:
                  | string
                  | RouteLocationAsRelativeGeneric
                  | RouteLocationAsPathGeneric,
          ) => Promise<void>;
      }