diff options
author | Marc Abramowitz <marc@marc-abramowitz.com> | 2015-05-11 07:52:59 -0700 |
---|---|---|
committer | Marc Abramowitz <marc@marc-abramowitz.com> | 2015-05-11 07:52:59 -0700 |
commit | 432792126d4bed37227d0b1ff7284325360558ac (patch) | |
tree | 3acef1cdcaa08a21ad01ed453deb1dc0aaeaa6c9 /paste/httpexceptions.py | |
parent | 55c7d721d40d133b9e2e93dea2e624b14888f76e (diff) | |
parent | de5383d1ecd35f18d6b9ba4520019d4bd05ee320 (diff) | |
download | paste-432792126d4bed37227d0b1ff7284325360558ac.tar.gz |
Merged in marsupial2k/paste (pull request #6)
Add HTTP exception for new code 429 "Too Many Requests"
Diffstat (limited to 'paste/httpexceptions.py')
-rw-r--r-- | paste/httpexceptions.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/paste/httpexceptions.py b/paste/httpexceptions.py index 6b8d5c5..0b68c2d 100644 --- a/paste/httpexceptions.py +++ b/paste/httpexceptions.py @@ -58,6 +58,7 @@ Exception * 415 - HTTPUnsupportedMediaType * 416 - HTTPRequestRangeNotSatisfiable * 417 - HTTPExpectationFailed + * 429 - HTTPTooManyRequests HTTPServerError * 500 - HTTPInternalServerError * 501 - HTTPNotImplemented @@ -526,6 +527,11 @@ class HTTPExpectationFailed(HTTPClientError): title = 'Expectation Failed' explanation = ('Expectation failed.') +class HTTPTooManyRequests(HTTPClientError): + code = 429 + title = 'Too Many Requests' + explanation = ('The client has sent too many requests to the server.') + # # 5xx Server Error # |