Closed innovatedev-john-pope closed 2 years ago
With these routes:
{ "/:filename+": serveStatic("public", { baseUrl: import.meta.url }), 404: () => new Response("not found", { status: 404 }), }
If I try going to a file that doesn't exist, it causes a 500 error and the response has an error message containing the file path, not the 404:
{"error":"No such file or directory (os error 2), open '/var/www/deno/public/missing.png'"}
Using the intervene option doesn't work either as the error is thrown before the intervene function is called.
intervene
With these routes:
If I try going to a file that doesn't exist, it causes a 500 error and the response has an error message containing the file path, not the 404:
Using the
intervene
option doesn't work either as the error is thrown before theintervene
function is called.