Skip to content

Commit

Permalink
Add 502 to specific list of retryable HTTP errors
Browse files Browse the repository at this point in the history
Fix an issue where we check the code (string) presence in an array of
Int values.
  • Loading branch information
alexstoick committed Jul 12, 2024
1 parent 6d1287b commit 2638cf1
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 @@ -220,7 +220,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, 504].include?(code.to_i) || (500..599).include?(code)
[400, 403, 405, 408, 429, 502, 504].include?(code.to_i) || (500..599).include?(code.to_i)
end

def retryable_log_method
Expand Down

0 comments on commit 2638cf1

Please sign in to comment.