import * as Sentry from "@sentry/nextjs"; import { useRouter } from "next/router"; // services import { Button, TOAST_TYPE, setToast } from "@plane/ui"; import DefaultLayout from "layouts/default-layout"; import { AuthService } from "services/auth.service"; // layouts // ui // services const authService = new AuthService(); const CustomErrorComponent = () => { const router = useRouter(); const handleSignOut = async () => { await authService .signOut() .catch(() => setToast({ type: TOAST_TYPE.ERROR, title: "Error!", message: "Failed to sign out. Please try again.", }) ) .finally(() => router.push("/")); }; return (

Exception Detected!

We{"'"}re Sorry! An exception has been detected, and our engineering team has been notified. We apologize for any inconvenience this may have caused. Please reach out to our engineering team at{" "} support@plane.so {" "} or on our{" "} Discord {" "} server for further assistance.

); }; CustomErrorComponent.getInitialProps = async (contextData: any) => { await Sentry.captureUnderscoreErrorException(contextData); const { res, err } = contextData; const statusCode = res ? res.statusCode : err ? err.statusCode : 404; return { statusCode }; }; export default CustomErrorComponent;