Exception: LedgerSync::Error::AdaptorError::ThrottleError

Inherits:
LedgerSync::Error::AdaptorError show all
Defined in:
lib/ledger_sync/error/adaptor_errors.rb

Instance Attribute Summary collapse

Attributes inherited from LedgerSync::Error::AdaptorError

#adaptor, #response

Attributes inherited from LedgerSync::Error

#message

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ThrottleError.



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

def initialize(adaptor:, message: nil, response: nil)
  message ||= 'Your request has been throttled.'
  @rate_limiting_wait_in_seconds = LedgerSync.adaptors.config_from_klass(
    klass: adaptor.class
  ).rate_limiting_wait_in_seconds

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

Instance Attribute Details

#rate_limiting_wait_in_secondsObject (readonly)

Returns the value of attribute rate_limiting_wait_in_seconds.



42
43
44
# File 'lib/ledger_sync/error/adaptor_errors.rb', line 42

def rate_limiting_wait_in_seconds
  @rate_limiting_wait_in_seconds
end