diff --git a/src/server/context.ts b/src/server/context.ts index 9395fc21..d3846d43 100644 --- a/src/server/context.ts +++ b/src/server/context.ts @@ -904,7 +904,7 @@ export class ServerContext { { ...ctx, error, - render: errorHandlerRender(req, {}, undefined, error), + render: errorHandlerRender(req, {}, ctx, error), }, ); }; diff --git a/tests/main_test.ts b/tests/main_test.ts index 9992eb5a..7d561f32 100644 --- a/tests/main_test.ts +++ b/tests/main_test.ts @@ -267,6 +267,10 @@ Deno.test("/failure", async () => { assertEquals(resp.status, Status.InternalServerError); const body = await resp.text(); assert(body.includes("500 internal error: it errored!")); + assertStringIncludes( + body, + ``, + ); }); Deno.test("/foo/:path*", async () => {