20 lines
613 B
TypeScript
20 lines
613 B
TypeScript
import { NextPage } from "next";
|
|
import { ErrorPage } from "@components/error/error-page";
|
|
import React from "react";
|
|
import { HttpError } from "@lib/core/http/error";
|
|
|
|
const PreviewErrorPage: NextPage = () => {
|
|
const statusCode = 403;
|
|
const message = `this was an http error ${statusCode}`;
|
|
const previousError = new Error("A test error");
|
|
const error = new HttpError({
|
|
statusCode,
|
|
message,
|
|
url: "http://some.invalid.url",
|
|
cause: previousError,
|
|
});
|
|
return <ErrorPage displayDebug={true} statusCode={statusCode} error={error} message={message} />;
|
|
};
|
|
|
|
export default PreviewErrorPage;
|