Revert "Bun.serve: error: pass Request parameter when available (#9310)" (#9332)

This reverts commit b92d98556b.
This commit is contained in:
Jarred Sumner
2024-03-09 08:44:03 -08:00
committed by GitHub
parent cd320835d1
commit 79e77f13ab
4 changed files with 52 additions and 132 deletions

View File

@@ -78,7 +78,7 @@ Bun.serve({
fetch(req) {
throw new Error("woops!");
},
error(error: Error, req: Request | null) {
error(error) {
return new Response(`<pre>${error}\n${error.stack}</pre>`, {
headers: {
"Content-Type": "text/html",