| | |
| | | * 415 - HTTPUnsupportedMediaType |
| | | * 416 - HTTPRequestRangeNotSatisfiable |
| | | * 417 - HTTPExpectationFailed |
| | | * 422 - HTTPUnprocessableEntity |
| | | * 423 - HTTPLocked |
| | | * 424 - HTTPFailedDependency |
| | | HTTPServerError |
| | | * 500 - HTTPInternalServerError |
| | | * 501 - HTTPNotImplemented |
| | |
| | | * 503 - HTTPServiceUnavailable |
| | | * 504 - HTTPGatewayTimeout |
| | | * 505 - HTTPVersionNotSupported |
| | | * 507 - HTTPInsufficientStorage |
| | | |
| | | Each HTTP exception has the following attributes: |
| | | HTTP exceptions are also :term:`response` objects, thus they accept most of |
| | | the same parameters that can be passed to a regular |
| | | :class:`~pyramid.response.Response`. Each HTTP exception also has the |
| | | following attributes: |
| | | |
| | | ``code`` |
| | | the HTTP status code for the exception |
| | |
| | | the explanation and further detail provided in the |
| | | message. |
| | | |
| | | Each HTTP exception accepts the following parameters: |
| | | Each HTTP exception accepts the following parameters, any others will |
| | | be forwarded to its :class:`~pyramid.response.Response` superclass: |
| | | |
| | | ``detail`` |
| | | a plain-text override of the default ``detail`` |
| | |
| | | a ``string.Template`` object containing a content fragment in HTML |
| | | that frames the explanation and further detail |
| | | |
| | | ``body`` |
| | | a string that will override the ``body_template`` and be used as the |
| | | body of the response. |
| | | |
| | | Substitution of response headers into template values is always performed. |
| | | Substitution of WSGI environment values is performed if a ``request`` is |
| | | passed to the exception's constructor. |