Exception: PyrxSynapse::SynapseRateLimitError

Inherits:
SynapseError
  • Object
show all
Defined in:
lib/pyrx_synapse/errors.rb

Overview

Raised on 429 Too Many Requests.

Instance Attribute Summary collapse

Attributes inherited from SynapseError

#code, #request_id, #status

Instance Method Summary collapse

Constructor Details

#initialize(message, status:, code: nil, request_id: nil, retry_after: 60.0) ⇒ SynapseRateLimitError

Returns a new instance of SynapseRateLimitError.



23
24
25
26
# File 'lib/pyrx_synapse/errors.rb', line 23

def initialize(message, status:, code: nil, request_id: nil, retry_after: 60.0)
  super(message, status: status, code: code, request_id: request_id)
  @retry_after = retry_after.to_f
end

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



21
22
23
# File 'lib/pyrx_synapse/errors.rb', line 21

def retry_after
  @retry_after
end