-
-
Notifications
You must be signed in to change notification settings - Fork 298
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 bad_request_handler
equivalent for METHOD_NOT_ALLOWED
#343
Comments
For example |
So instead of using
Unfortunately I don't have a great way to figure out which errors are framework errors now vs my own, do you have any tips? I'm currently exploiting the fact that my own errors don't have a Perhaps something like The way I'm building the response is obviously also very janky, but I don't have a great suggestion there yet. |
Alternatively it'd be great if there was some way to identify my own error and then know that everything else is an API error. Unfortunately by this point my error is just an opaque Poem error. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
I have an OpenAPI based server that says that it only ever returns JSON formatted errors. However, the framework doesn't do this by default. For most errors that originate from the framework, you can use
bad_request_handler
to convert the error, but this doesn't work forMETHOD_NOT_ALLOWED
. It would be nice if we had an option for this. Beyond that, perhaps just a method that is more general thanbad_request_handler
that works for every request the framework returns.The text was updated successfully, but these errors were encountered: