Method: DatadogAPIClient::APIClient#should_retry
- Defined in:
- lib/datadog_api_client/api_client.rb
#should_retry(attempt, max_retries, http_code, enable_retry) ⇒ Object
Check if an http request should be retried
136 137 138 |
# File 'lib/datadog_api_client/api_client.rb', line 136 def should_retry(attempt, max_retries, http_code, enable_retry) (http_code == 429 || http_code >= 500) && max_retries > attempt && enable_retry end |