Exception: LedgerSync::Error::LedgerError::ThrottleError

Inherits:
LedgerSync::Error::LedgerError show all
Defined in:
lib/ledger_sync/error/ledger_errors.rb

Instance Attribute Summary collapse

Attributes inherited from LedgerSync::Error::LedgerError

#client, #response

Attributes inherited from LedgerSync::Error

#message

Instance Method Summary collapse

Constructor Details

#initialize(client:, message: nil, response: nil) ⇒ ThrottleError

Returns a new instance of ThrottleError.



43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/ledger_sync/error/ledger_errors.rb', line 43

def initialize(client:, message: nil, response: nil)
  message ||= 'Your request has been throttled.'
  @rate_limiting_wait_in_seconds = LedgerSync.ledgers.config_from_class(
    client_class: client.class
  ).rate_limiting_wait_in_seconds

  super(
    client: client,
    message: message,
    response: response
  )
end

Instance Attribute Details

#rate_limiting_wait_in_secondsObject (readonly)

Returns the value of attribute rate_limiting_wait_in_seconds.



41
42
43
# File 'lib/ledger_sync/error/ledger_errors.rb', line 41

def rate_limiting_wait_in_seconds
  @rate_limiting_wait_in_seconds
end