import { BlankSlate, BlankSlateDescription, BlankSlateIcon, BlankSlateTitle, Box, ErrorBoundary as EditorUiErrorBoundary, Text, } from "@prismicio/editor-ui"; import { isInvalidActiveEnvironmentError, isUnauthorizedError, } from "@slicemachine/manager/client"; import Link from "next/link"; import { PropsWithChildren } from "react"; import { ReloadLogoutButton } from "@/features/auth/LogoutButton"; export function AppStateErrorBoundary(props: PropsWithChildren) { return ( { return ( Failed to load Slice Machine ); }} > {props.children} ); } function RenderErrorDescription(args: { error: unknown }) { const { error } = args; if (isUnauthorizedError(error)) { return ( You don't have access to this repository. Check that the repository name is correct, then contact your repository administrator. ); } if (isInvalidActiveEnvironmentError(error)) { return ( Your current environment is invalid. Check with your repository administrator that you have permissions and correctly configured your environment for the current repository. For more details, consult the{" "} documentation . ); } return {JSON.stringify(error)}; } function CommonErrorBox(args: { children: React.ReactNode }) { const { children } = args; return ( {children} ); }