Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

update doc references

  • Loading branch information...
commit 6b0889cc8f3711d5f77cb663f8f2fa432eb3ad06 1 parent 0e2914b
@mmerickel mmerickel authored
@@ -10,6 +10,11 @@ Features
python -3 -m pyramid.scripts.pserve development.ini
+- Added a specific subclass of ``HTTPBadRequest`` named
+ ``pyramid.exceptions.BadCSRFToken`` which will now be raised in response
+ to failures in ``check_csrf_token``.
+ See
Bug Fixes
2  docs/api/exceptions.rst
@@ -5,6 +5,8 @@
.. automodule:: pyramid.exceptions
+ .. autoclass:: BadCSRFToken
.. autoclass:: PredicateMismatch
.. autoclass:: Forbidden
13 docs/api/httpexceptions.rst
@@ -10,9 +10,6 @@
A mapping of integer status code to HTTP exception class (eg. the integer
"401" maps to :class:`pyramid.httpexceptions.HTTPUnauthorized`). All
mapped exception classes are children of :class:`pyramid.httpexceptions`,
- i.e. the :ref:`pyramid_specific_http_exceptions` such as
- :class:`pyramid.httpexceptions.HTTPBadRequest.BadCSRFToken` are not
- mapped.
.. autofunction:: exception_response
@@ -109,13 +106,3 @@
.. autoclass:: HTTPVersionNotSupported
.. autoclass:: HTTPInsufficientStorage
-.. _pyramid_specific_http_exceptions:
-Pyramid-specific HTTP Exceptions
-Each Pyramid-specific HTTP exception has the status code of it's parent.
- .. autoclass:: HTTPBadCSRFToken
17 pyramid/
@@ -2,13 +2,10 @@
HTTP Exceptions
-This module contains Pyramid HTTP exception classes. Each class is a subclass
-of the :class:`~HTTPException`. Each class relates to a single HTTP status
-code, although the reverse is not true. There are
-:ref:`pyramid_specific_http_exceptions` which are sub-classes of the
-:rfc:`2608` HTTP status codes. Each of these Pyramid-specific exceptions have
-the status code of it's parent. Each exception class is also a
-:term:`response` object.
+This module contains Pyramid HTTP exception classes. Each class relates to a
+single HTTP status code. Each class is a subclass of the
+:class:`~HTTPException`. Each exception class is also a :term:`response`
Each exception class has a status code according to :rfc:`2068`:
codes with 100-300 are not really errors; 400s are client errors,
@@ -571,10 +568,10 @@ class HTTPBadRequest(HTTPClientError):
subclass of :class:`~HTTPClientError`
- base class for Pyramid-specific validity checks of the client's request
+ This indicates that the body or headers failed validity checks,
+ preventing the server from being able to continue processing.
- This class and it's sub-classes result in a '400 Bad Request' HTTP status,
- although it's sub-classes specialize the 'Bad Request' text.
+ code: 400, title: Bad Request
Please sign in to comment.
Something went wrong with that request. Please try again.