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

ASGI exceptions outside handlers should be able to pass status #2718

Open
ahopkins opened this issue Mar 19, 2023 · 0 comments
Open

ASGI exceptions outside handlers should be able to pass status #2718

ahopkins opened this issue Mar 19, 2023 · 0 comments

Comments

@ahopkins
Copy link
Member

ahopkins commented Mar 19, 2023

An exception raised in the lifecycle (but not handler) of a request on an ASGI-served application should be able to pass a status code.


In my experiment, raising a BadRequest in asgi.py will cause the ASGI server return 500 error, instead of 400. This seems out of the scope of this PR, but I am wondering whether we should change the raised error to ServerError or others before we figure out how to let ASGI server return a 400 error.

Originally posted by @ChihweiLHBird in #2606 (comment)

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

No branches or pull requests

1 participant