Exception: LabelZoom::RateLimitedError
- Defined in:
- lib/labelzoom/errors.rb
Overview
HTTP 429. Too many requests.
Instance Attribute Summary collapse
-
#retry_after_seconds ⇒ Float?
readonly
Retry-After in seconds, when the server sent one.
Attributes inherited from APIError
#raw_body, #request_id, #status
Instance Method Summary collapse
-
#initialize(message, retry_after_seconds: nil, **kwargs) ⇒ RateLimitedError
constructor
A new instance of RateLimitedError.
Constructor Details
#initialize(message, retry_after_seconds: nil, **kwargs) ⇒ RateLimitedError
Returns a new instance of RateLimitedError.
63 64 65 66 |
# File 'lib/labelzoom/errors.rb', line 63 def initialize(, retry_after_seconds: nil, **kwargs) super(, **kwargs) @retry_after_seconds = retry_after_seconds end |
Instance Attribute Details
#retry_after_seconds ⇒ Float? (readonly)
Returns Retry-After in seconds, when the server sent one. The client already honours this during its own retries; this exposes it for callers doing their own.
61 62 63 |
# File 'lib/labelzoom/errors.rb', line 61 def retry_after_seconds @retry_after_seconds end |