Exception: SeatLayer::RateLimitError

Inherits:
APIError show all
Defined in:
lib/seatlayer/errors.rb

Overview

  1. retry_after prefers the header over the JSON field.

Instance Attribute Summary collapse

Attributes inherited from APIError

#body, #code, #request_id, #status

Instance Method Summary collapse

Methods inherited from APIError

from_response

Constructor Details

#initialize(retry_after:, **attrs) ⇒ RateLimitError

Returns a new instance of RateLimitError.



95
96
97
98
# File 'lib/seatlayer/errors.rb', line 95

def initialize(retry_after:, **attrs)
  @retry_after = retry_after
  super(**attrs)
end

Instance Attribute Details

#retry_afterFloat (readonly)

Returns seconds to wait before retrying.

Returns:

  • (Float)

    seconds to wait before retrying.



93
94
95
# File 'lib/seatlayer/errors.rb', line 93

def retry_after
  @retry_after
end