lib/flexirest/request.rb in flexirest-1.8.5 vs lib/flexirest/request.rb in flexirest-1.8.6
- old
+ new
@@ -601,10 +601,10 @@
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
+ elsif status == 429
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)