Exception: LabelZoom::RateLimitedError

Inherits:
APIError
  • Object
show all
Defined in:
lib/labelzoom/errors.rb

Overview

HTTP 429. Too many requests.

Instance Attribute Summary collapse

Attributes inherited from APIError

#raw_body, #request_id, #status

Instance Method Summary collapse

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(message, retry_after_seconds: nil, **kwargs)
  super(message, **kwargs)
  @retry_after_seconds = retry_after_seconds
end

Instance Attribute Details

#retry_after_secondsFloat? (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.

Returns:

  • (Float, nil)

    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