denoland / denoland/deploy_feedback

Custom error pages

Open
#698 0 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
79
Forks
5
PR merge metrics
No merged PRs in 30d

Description

### 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](https://github.com/user-attachments/assets/56cfe630-be03-4007-bf8c-910589255e64)

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

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`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.