Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add HTTPTooManyRequestsClientException
- Loading branch information
1 parent
e6154dc
commit 5845016
Showing
3 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -584,6 +584,8 @@ def handle_response(response, cached = nil) | |
raise HTTPTimeoutClientException.new(status:status, result:error_response, raw_response: @response.body, url:@url, method: http_method) | ||
elsif status == 409 | ||
raise HTTPConflictClientException.new(status:status, result:error_response, raw_response: @response.body, url:@url, method: http_method) | ||
elsif status == 409 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
andyjeffries
Author
Collaborator
|
||
raise HTTPTooManyRequestsClientException.new(status:status, result:error_response, raw_response: @response.body, url:@url, method: http_method) | ||
elsif (400..499).include? status | ||
raise HTTPClientException.new(status:status, result:error_response, raw_response: @response.body, url:@url, method: http_method) | ||
elsif (500..599).include? status | ||
|
@@ -841,6 +843,7 @@ class HTTPNotAcceptableClientException < HTTPClientException ; end | |
class HTTPTimeoutClientException < HTTPClientException ; end | ||
class HTTPConflictClientException < HTTPClientException ; end | ||
class HTTPNotFoundClientException < HTTPClientException ; end | ||
class HTTPTooManyRequestsClientException < HTTPClientException ; end | ||
class HTTPServerException < HTTPException ; end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module Flexirest | ||
VERSION = "1.8.0" | ||
VERSION = "1.8.1" | ||
end |
@andyjeffries
This is correct?
I think
429
is right.