import { Link, isRouteErrorResponse, useRouteError } from "@remix-run/react";
export default function ErrorPage() {
const error = useRouteError();
// If error response is sent, use correct errors
if (isRouteErrorResponse(error)) {
return (
Error {error.status}
{error.data}
If you believe you reached this page in error, please file an issue{" "}
here
Back to Home
);
} else if (error instanceof Error) {
return (
Error {error.name}
Error {error.message}
If you believe you reached this page in error, please file an issue{" "}
here
Back to Home
);
} else {
return (
Error 500
If you believe you reached this page in error, please file an issue{" "}
here
Back to Home
);
}
}