Skip to content

Commit

Permalink
Merge pull request #12 from Smashman/patch-1
Browse files Browse the repository at this point in the history
409 -> 429 in documentation
  • Loading branch information
alisaifee committed Jul 9, 2014
2 parents 612b308 + b23ff26 commit e9d61ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ Rate limiting all requests by country::

Rate limit exeeded responses
----------------------------
The default configuration results in an ``abort(409)`` being called everytime
The default configuration results in an ``abort(429)`` being called everytime
a ratelimit is exceeded for a particular route. The exceeded limit is added to
the response and results in an response body that looks something like::

Expand All @@ -406,7 +406,7 @@ the response and results in an response body that looks something like::


If you want to configure the response you can register an error handler for the
``409`` error code in a manner similar to the following example, which returns a
``429`` error code in a manner similar to the following example, which returns a
json response instead::

@app.errorhandler(429)
Expand Down
2 changes: 1 addition & 1 deletion flask_limiter/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ConfigurationError(Exception):
class RateLimitExceeded(HTTPException):
"""
exception raised when a rate limit is hit.
The exception results in ``abort(409)`` being called.
The exception results in ``abort(429)`` being called.
"""
code = 429
def __init__(self, limit):
Expand Down

0 comments on commit e9d61ee

Please sign in to comment.