import type { ErrorPageParam, Theme } from "../../types.js" /** * The following errors are passed as error query parameters to the default or overridden error page. * * [Documentation](https://authjs.dev/guides/basics/pages#error-page) */ export interface ErrorProps { url?: URL theme?: Theme error?: ErrorPageParam } interface ErrorView { status: number heading: string message: JSX.Element signin?: JSX.Element } /** Renders an error page. */ export default function ErrorPage(props: ErrorProps) { const { url, error = "default", theme } = props const signinPageUrl = `${url}/signin` const errors: Record = { default: { status: 200, heading: "Error", message: (

{url?.host}

), }, Configuration: { status: 500, heading: "Server error", message: (

There is a problem with the server configuration.

Check the server logs for more information.

), }, AccessDenied: { status: 403, heading: "Access Denied", message: (

You do not have permission to sign in.

Sign in

), }, Verification: { status: 403, heading: "Unable to sign in", message: (

The sign in link is no longer valid.

It may have been used already or it may have expired.

), signin: ( Sign in ), }, } const { status, heading, message, signin } = errors[error] ?? errors.default return { status, html: (
{theme?.brandColor && (