Exception: Marketing::AdSpend::AmazonAdapter::ReportsThrottledError

Inherits:
AmazonAds::ApiClient::ThrottledError show all
Defined in:
app/services/marketing/ad_spend/amazon_adapter.rb

Overview

Carries already-created reports across a throttled request transition so
the next short job resumes the missing set instead of orphaning quota.

Instance Attribute Summary collapse

Attributes inherited from AmazonAds::ApiClient::ThrottledError

#retry_after

Instance Method Summary collapse

Constructor Details

#initialize(error, reports:) ⇒ ReportsThrottledError

Returns a new instance of ReportsThrottledError.

Parameters:



38
39
40
41
42
# File 'app/services/marketing/ad_spend/amazon_adapter.rb', line 38

def initialize(error, reports:)
  @reports = reports
  super(error.message, retry_after: error.retry_after)
  set_backtrace(error.backtrace)
end

Instance Attribute Details

#reportsArray<Hash> (readonly)

Returns report state created before the throttle hit.

Returns:

  • (Array<Hash>)

    report state created before the throttle hit



34
35
36
# File 'app/services/marketing/ad_spend/amazon_adapter.rb', line 34

def reports
  @reports
end