lib/flexirest/request.rb in flexirest-1.8.0 vs lib/flexirest/request.rb in flexirest-1.8.1
- old
+ new
@@ -582,10 +582,12 @@
raise HTTPNotAcceptableClientException.new(status:status, result:error_response, raw_response: @response.body, url:@url, method: http_method)
elsif status == 408
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
+ 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
raise HTTPServerException.new(status:status, result:error_response, raw_response: @response.body, url:@url, method: http_method)
elsif status == 0
@@ -839,8 +841,9 @@
class HTTPMethodNotAllowedClientException < HTTPClientException ; end
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