Exception: Fopost::RateLimitError

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

Overview

429 — rate limit exceeded. #retry_after is in seconds when the API sends it.

Instance Attribute Summary collapse

Attributes inherited from Error

#body, #code, #message, #status

Instance Method Summary collapse

Methods inherited from Error

#to_s

Constructor Details

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

Returns a new instance of RateLimitError.



63
64
65
66
# File 'lib/fopost/errors.rb', line 63

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

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



61
62
63
# File 'lib/fopost/errors.rb', line 61

def retry_after
  @retry_after
end