Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "421 Misdirected Request" http exception #2850

Open
n1ngu opened this issue Feb 10, 2024 · 0 comments
Open

Add "421 Misdirected Request" http exception #2850

n1ngu opened this issue Feb 10, 2024 · 0 comments

Comments

@n1ngu
Copy link

n1ngu commented Feb 10, 2024

Related: #1256

Any concerns against adding a http exception class for this status code?

Right now aborting fails with a LookupError: no exception for <HTTPStatus.MISDIRECTED_REQUEST: 421> error if you try

abort(http.HTTPStatus.MISDIRECTED_REQUEST)

The Aborter class can be enriched to feature extra status codes and the Response class can be used to return arbitrary status codes and messages. But wouldn't it make sense that this http exception was featured out of the box?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant