Skip to content

Commit

Permalink
fix(integration): Fix rate limit handling
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-pochet committed Oct 14, 2024
1 parent 3b1fd64 commit 9f87de5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/services/integrations/aggregator/base_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ def message(error)
def request_limit_error?(http_error)
return false unless http_error.error_code.to_i == 500

http_error.json_message.dig('error', 'payload', 'error', 'code') == REQUEST_LIMIT_ERROR_CODE
rescue JSON::ParserError
false
http_error.error_body.include?(REQUEST_LIMIT_ERROR_CODE)
end
end
end
Expand Down

0 comments on commit 9f87de5

Please sign in to comment.