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

Attributes inherited from LedgerSync::Error

#message

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ThrottleError.



32
33
34
35
36
37
38
39
# File 'lib/ledger_sync/error/adaptor_errors.rb', line 32

def initialize(adaptor:, message: 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)
end

Instance Attribute Details

#rate_limiting_wait_in_secondsObject (readonly)

Returns the value of attribute rate_limiting_wait_in_seconds.



30
31
32
# File 'lib/ledger_sync/error/adaptor_errors.rb', line 30

def rate_limiting_wait_in_seconds
  @rate_limiting_wait_in_seconds
end