diff --git a/apps/app/pages/[workspaceSlug]/index.tsx b/apps/app/pages/[workspaceSlug]/index.tsx index 6d600ef8f..068ff8dbe 100644 --- a/apps/app/pages/[workspaceSlug]/index.tsx +++ b/apps/app/pages/[workspaceSlug]/index.tsx @@ -35,6 +35,8 @@ const WorkspacePage: NextPage = () => { workspaceSlug ? () => userService.userWorkspaceDashboard(workspaceSlug as string) : null ); + hi = "hi"; + return (
diff --git a/apps/app/pages/_error.js b/apps/app/pages/_error.js index f1ee86ca7..1ccedd13a 100644 --- a/apps/app/pages/_error.js +++ b/apps/app/pages/_error.js @@ -19,15 +19,32 @@ import * as Sentry from "@sentry/nextjs"; import NextErrorComponent from "next/error"; -const CustomErrorComponent = (props) => ; +const CustomErrorComponent = ({ statusCode }) => { + console.log(statusCode, "statusCode"); + + return ( +

+ 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) => { // In case this is running in a serverless function, await this in order to give Sentry // time to send the error before the lambda exits await Sentry.captureUnderscoreErrorException(contextData); - // This will contain the status code of the response - return NextErrorComponent.getInitialProps(contextData); + const { res, err } = contextData; + + const statusCode = res ? res.statusCode : err ? err.statusCode : 404; + + return { statusCode }; }; export default CustomErrorComponent;