Exception: Postio::RateLimitError

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

Overview

429 — rate limited. #retry_after is the API’s suggested wait in seconds.

Instance Attribute Summary collapse

Attributes inherited from Error

#cause_error, #details, #envelope, #error_code, #request_id, #status

Instance Method Summary collapse

Constructor Details

#initialize(message, retry_after: nil, **kwargs) ⇒ RateLimitError

Returns a new instance of RateLimitError.



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

def initialize(message, retry_after: nil, **kwargs)
  super(message, **kwargs)
  @retry_after = retry_after
end

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



34
35
36
# File 'lib/postio/errors.rb', line 34

def retry_after
  @retry_after
end