-
Notifications
You must be signed in to change notification settings - Fork 887
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
Base httpexception classes and exception_response function #1832
Comments
Thanks for the report!
|
Thanks for the reply httpexceptions.py contains next lines (pyramid 1.5.6): class HTTPClientError(HTTPError):
"""
base class for the 400s, where the client is in error
This is an error condition in which the client is presumed to be
in-error. This is an expected problem, and thus is not considered
a bug. A server-side traceback is not warranted. Unless specialized,
this is a '400 Bad Request'
"""
code = 400
title = 'Bad Request'
explanation = ('The server could not comply with the request since '
'it is either malformed or otherwise incorrect.')
class HTTPBadRequest(HTTPClientError):
"""
subclass of :class:`~HTTPClientError`
This indicates that the body or headers failed validity checks,
preventing the server from being able to continue processing.
code: 400, title: Bad Request
"""
pass Base class has a code equals 400. Unfortunately |
…se'. The base classes are not appropriate for ``400`` and ``500`` status codes. See: #1832
…se'. The base classes are not appropriate for 400 and 500 status codes. See: #1832
The base classes are not appropriate for ``400`` and ``500`` status codes. See: #1832
…se'. The base classes are not appropriate for 400 and 500 status codes. See: #1832
Thanks! |
I cannot catch HTTPBadRequest exception in case:
Of cource, i could replace code with:
But exception_response function is used by third party code, and i cannot change it.
Also this bug applies for 500-status errors
The text was updated successfully, but these errors were encountered: