Exception: HookBridge::RateLimitError
- Defined in:
- lib/hookbridge/errors.rb
Overview
Raised when rate limit is exceeded (429)
Instance Attribute Summary collapse
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
Attributes inherited from Error
#code, #request_id, #status_code
Instance Method Summary collapse
-
#initialize(message = "Rate limit exceeded", retry_after: nil, **kwargs) ⇒ RateLimitError
constructor
A new instance of RateLimitError.
Constructor Details
#initialize(message = "Rate limit exceeded", retry_after: nil, **kwargs) ⇒ RateLimitError
Returns a new instance of RateLimitError.
41 42 43 44 |
# File 'lib/hookbridge/errors.rb', line 41 def initialize( = "Rate limit exceeded", retry_after: nil, **kwargs) @retry_after = retry_after super(, code: "RATE_LIMIT_EXCEEDED", status_code: 429, **kwargs) end |
Instance Attribute Details
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
39 40 41 |
# File 'lib/hookbridge/errors.rb', line 39 def retry_after @retry_after end |