denoland / deploy_feedback

For reporting issues with Deno Deploy
https://deno.com/deploy
74 stars 5 forks source link

Custom error pages #698

Open ericlery opened 1 month ago

ericlery commented 1 month ago

What problem are you trying to solve?

While reading about the new and long awaited spending limit, thank you by the way, I saw what would be the default page in case of a 403 image

Describe the solution you'd like

It would be nice to be able to have a .deno/deploy/errors/html folder with a bunch of static document like 403.html etc… So it would be cool to be able to return other format like JSON, XML, etc… all static of course.

As 403 and other errors could be caused by many reason, codes could charge different static page.

Ideally like denoland/fresh and other frameworks support these error pages, we should be able to choose in the Deploy dashboard if we want to default on the Deploy Custom Pages or framework level error pages.

Of course depending on the Accept header, it would charge the right folder between .deno/deploy/errors/{html,json,xml}

Describe alternatives you've considered

Alternatively Deploy custom pages would be the only one working without any choice possible if present in the project folder .deno/deploy/errors/html