Exception: Hookdeck::RateLimitError
- Defined in:
- lib/hookdeck/errors.rb
Instance Attribute Summary collapse
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
Attributes inherited from ApiError
#data, #handled, #message, #request_id, #response, #status
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(response) ⇒ RateLimitError
constructor
A new instance of RateLimitError.
Constructor Details
#initialize(response) ⇒ RateLimitError
Returns a new instance of RateLimitError.
97 98 99 100 101 |
# File 'lib/hookdeck/errors.rb', line 97 def initialize(response) super @status = 429 @retry_after = response&.dig(:headers, 'retry-after')&.to_i end |
Instance Attribute Details
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
95 96 97 |
# File 'lib/hookdeck/errors.rb', line 95 def retry_after @retry_after end |