Skip to content
This repository has been archived by the owner on Oct 3, 2019. It is now read-only.

Commit

Permalink
[ch35605] TooManyRequestsResponse 429 (#16)
Browse files Browse the repository at this point in the history
* [add] TooManyRequestsResponse 429

* Update README.md

* [cr] nit
  • Loading branch information
finalprototype committed Aug 15, 2019
1 parent 0bc9b49 commit e3d5635
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ responses.ClientErrorResponse("quote_state_error", "Cannot approve an already ap
responses.ClientErrorResponse("email_already_taken", "The email you have provided is already in use")
```

#### `TooManyRequestsResponse`
* 429
* `error_code`
* `"too_many_requests"`
```python
responses.TooManyRequestsResponse(detail="Too many requests for template")
```

#### `ServerErrorResponse`
* 500
* `error_code`
Expand Down
2 changes: 1 addition & 1 deletion mbq/api_tools/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
__license__ = "Apache 2.0"
__title__ = "mbq.apitools"
__url__ = "https://github.com/managedbyq/mbq.apitools"
__version__ = "1.4.2"
__version__ = "1.4.3"
5 changes: 5 additions & 0 deletions mbq/api_tools/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ class ServerValidationErrorResponse(ErrorResponse):
status_code = 422


class TooManyRequestsResponse(ErrorResponse):
status_code = 429
error_code = "too_many_requests"


class ServerErrorResponse(ErrorResponse):
status_code = 500
error_code = "server_error"
Expand Down

0 comments on commit e3d5635

Please sign in to comment.