Exception: ShipEngine::Exceptions::RateLimitError

Inherits:
SystemError show all
Defined in:
lib/shipengine/exceptions.rb

Instance Attribute Summary collapse

Attributes inherited from ShipEngineError

#code, #request_id, #source, #type, #url

Instance Method Summary collapse

Constructor Details

#initialize(retries: nil, message: 'You have exceeded the rate limit.', source: nil, request_id: nil) ⇒ RateLimitError

Returns a new instance of RateLimitError.



93
94
95
96
97
98
99
100
101
102
# File 'lib/shipengine/exceptions.rb', line 93

def initialize(retries: nil, message: 'You have exceeded the rate limit.', source: nil, request_id: nil)
  super(
    message:,
    code: ErrorCode.get(:RATE_LIMIT_EXCEEDED),
    request_id:,
    source:,
    url: URI('https://www.shipengine.com/docs/rate-limits'),
  )
  @retries = retries
end

Instance Attribute Details

#retriesObject (readonly)

Returns the value of attribute retries.



91
92
93
# File 'lib/shipengine/exceptions.rb', line 91

def retries
  @retries
end