summaryrefslogtreecommitdiff
path: root/paste/httpexceptions.py
diff options
context:
space:
mode:
authorNeil Williams <neil@reddit.com>2011-12-23 02:01:05 -0800
committerNeil Williams <neil@reddit.com>2011-12-23 02:01:05 -0800
commitde5383d1ecd35f18d6b9ba4520019d4bd05ee320 (patch)
treecdbc3600409af497ea3d484f48af7cd192c6b2f7 /paste/httpexceptions.py
parent700ac21dbf6d04de914eb5c891371cd533afada8 (diff)
downloadpaste-de5383d1ecd35f18d6b9ba4520019d4bd05ee320.tar.gz
Add HTTP 429 "Too Many Requests"
http://www.ietf.org/id/draft-nottingham-http-new-status-03.txt
Diffstat (limited to 'paste/httpexceptions.py')
-rw-r--r--paste/httpexceptions.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/paste/httpexceptions.py b/paste/httpexceptions.py
index ede4f7e..85e7c84 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
@@ -525,6 +526,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
#