Custom error pages
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
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.
-
403when the user is logged but don't have the right role:403-role-insufficient.html -
403when Deno deploy pro triggers spending limit:403-spending-limit.html - if there's only a
403.html, it's the only403sent for all type of403.
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