Exception: AmazonAds::ApiClient::ThrottledError
- Inherits:
-
StandardError
- Object
- StandardError
- AmazonAds::ApiClient::ThrottledError
- Defined in:
- app/services/amazon_ads/api_client.rb
Overview
Raised as soon as Amazon responds with a throttle. Callers treat this
differently from a generic failure: continuing to hammer a
throttled endpoint just burns the remaining quota and guarantees the
next request fails too, so the right response is to stop and come back
later. Nested here rather than under AmazonAds so Zeitwerk resolves it
from this file.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#retry_after ⇒ Integer?
readonly
Seconds Amazon asked us to wait, when it said.
Instance Method Summary collapse
-
#initialize(message = nil, retry_after: nil) ⇒ ThrottledError
constructor
A new instance of ThrottledError.
Constructor Details
#initialize(message = nil, retry_after: nil) ⇒ ThrottledError
Returns a new instance of ThrottledError.
38 39 40 41 |
# File 'app/services/amazon_ads/api_client.rb', line 38 def initialize( = nil, retry_after: nil) @retry_after = retry_after super() end |
Instance Attribute Details
#retry_after ⇒ Integer? (readonly)
Returns seconds Amazon asked us to wait, when it said.
34 35 36 |
# File 'app/services/amazon_ads/api_client.rb', line 34 def retry_after @retry_after end |