fix: Use custom 500 page for *all* handlers if present (#1362)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
import { ErrorPageProps } from "../../../server.ts";
|
||||
|
||||
export default function Error500Page({ error }: ErrorPageProps) {
|
||||
return <p class="custom-500">Custom 500: {(error as Error).message}</p>;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { Handlers } from "../../../server.ts";
|
||||
|
||||
export const handler: Handlers = {
|
||||
GET(_req, ctx) {
|
||||
throw new Error("Pickle Rick!");
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user