diff options
-rw-r--r-- | paste/httpexceptions.py | 6 | ||||
-rw-r--r-- | paste/wsgiwrappers.py | 1 |
2 files changed, 7 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 # diff --git a/paste/wsgiwrappers.py b/paste/wsgiwrappers.py index 1cbae4f..7b8f6de 100644 --- a/paste/wsgiwrappers.py +++ b/paste/wsgiwrappers.py @@ -579,6 +579,7 @@ STATUS_CODE_TEXT = { 415: 'UNSUPPORTED MEDIA TYPE', 416: 'REQUESTED RANGE NOT SATISFIABLE', 417: 'EXPECTATION FAILED', + 429: 'TOO MANY REQUESTS', 500: 'INTERNAL SERVER ERROR', 501: 'NOT IMPLEMENTED', 502: 'BAD GATEWAY', |