Exception: Wave::RateLimitError

Inherits:
Error
  • Object
show all
Defined in:
lib/wave/errors.rb

Overview

Raised on HTTP 429 once the retry budget is exhausted.

Instance Attribute Summary collapse

Attributes inherited from Error

#code, #details, #request_id, #retryable, #status_code

Instance Method Summary collapse

Methods inherited from Error

retryable?

Constructor Details

#initialize(message, retry_after:, request_id: nil) ⇒ RateLimitError

Returns a new instance of RateLimitError.



30
31
32
33
# File 'lib/wave/errors.rb', line 30

def initialize(message, retry_after:, request_id: nil)
  super(message, code: "RATE_LIMITED", status_code: 429, request_id: request_id)
  @retry_after = retry_after
end

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



28
29
30
# File 'lib/wave/errors.rb', line 28

def retry_after
  @retry_after
end