Skip to content

Commit

Permalink
Remove redundant 502 & 504 response codes (#46)
Browse files Browse the repository at this point in the history
Already handled by the `500..599` range.

From PR chat in
https://github.com/rinsed-org/rb-snowflake-client/pull/45/files#r1675761722.
  • Loading branch information
jordan-brough authored Jul 12, 2024
1 parent 90d38b0 commit 9ba8b75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ruby_snowflake/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def raise_on_bad_response(response)
def retryable_http_response_code?(code)
# retry (in order): bad request, forbidden (token expired in flight), method not allowed,
# request timeout, too many requests, anything in the 500 range (504 is fairly common)
[400, 403, 405, 408, 429, 502, 504].include?(code.to_i) || (500..599).include?(code.to_i)
[400, 403, 405, 408, 429].include?(code.to_i) || (500..599).include?(code.to_i)
end

def retryable_log_method
Expand Down

0 comments on commit 9ba8b75

Please sign in to comment.