Exception: Ksef::RateLimitError

Inherits:
Error
  • Object
show all
Defined in:
lib/ksef/errors.rb

Overview

Raised when the API returns 429. ‘retry_after` is in seconds when known.

Instance Attribute Summary collapse

Attributes inherited from Error

#body, #code, #status

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, status: nil, body: nil, code: nil, retry_after: nil) ⇒ RateLimitError

Returns a new instance of RateLimitError.



39
40
41
42
# File 'lib/ksef/errors.rb', line 39

def initialize(message = nil, status: nil, body: nil, code: nil, retry_after: nil)
  super(message, status: status, body: body, code: code)
  @retry_after = retry_after
end

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



37
38
39
# File 'lib/ksef/errors.rb', line 37

def retry_after
  @retry_after
end