diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index be9833108..293040d89 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -37,7 +37,7 @@ jobs: cache: "npm" - name: Update npm - - run: "npm i -g npm@11.8.0" + run: npm i -g npm@11.8.0 - name: Install dependencies run: npm ci diff --git a/apps/console/src/components/PageError.tsx b/apps/console/src/components/PageError.tsx index 1383bf3eb..d69438b24 100644 --- a/apps/console/src/components/PageError.tsx +++ b/apps/console/src/components/PageError.tsx @@ -14,7 +14,7 @@ const classNames = { type Props = { resetErrorBoundary?: () => void; - error?: string; + error?: Error; }; export function PageError({ resetErrorBoundary, error: propsError }: Props) { diff --git a/apps/console/src/routes.tsx b/apps/console/src/routes.tsx index c8b965c31..651049d24 100644 --- a/apps/console/src/routes.tsx +++ b/apps/console/src/routes.tsx @@ -1,9 +1,7 @@ import { Role } from "@probo/helpers"; import { lazy } from "@probo/react-lazy"; import { - ForbiddenError, UnAuthenticatedError, - UnauthorizedError, } from "@probo/relay"; import { type AppRoute, routeFromAppRoute } from "@probo/routes"; import { CenteredLayout } from "@probo/ui"; @@ -42,22 +40,14 @@ import { vendorRoutes } from "./routes/vendorRoutes"; /** * Top level error boundary */ -function ErrorBoundary({ error: propsError }: { error?: string }) { - const error = useRouteError() ?? propsError; +function ErrorBoundary() { + const error = useRouteError(); if (error instanceof UnAuthenticatedError) { return ; } - if (error instanceof UnauthorizedError) { - return ; - } - - if (error instanceof ForbiddenError) { - return ; - } - - return ; + return ; } const routes = [ diff --git a/apps/trust/src/components/PageError.tsx b/apps/trust/src/components/PageError.tsx index 587a012c9..6952143c7 100644 --- a/apps/trust/src/components/PageError.tsx +++ b/apps/trust/src/components/PageError.tsx @@ -13,7 +13,7 @@ const classNames = { type Props = { resetErrorBoundary?: () => void; - error?: string; + error?: Error; }; export function PageError({ resetErrorBoundary, error: propsError }: Props) { diff --git a/apps/trust/src/routes.tsx b/apps/trust/src/routes.tsx index c07e9dad1..4f1fced60 100644 --- a/apps/trust/src/routes.tsx +++ b/apps/trust/src/routes.tsx @@ -26,10 +26,10 @@ import { consoleEnvironment } from "./providers/RelayProviders.tsx"; /** * Top level error boundary */ -function ErrorBoundary({ error: propsError }: { error?: string }) { - const error = useRouteError() ?? propsError; +function ErrorBoundary() { + const error = useRouteError(); - return ; + return ; } const routes = [