Exception: ShipEngine::Exceptions::RateLimitError

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

Instance Attribute Summary collapse

Attributes inherited from ShipEngineError

#code, #source, #type, #url

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of RateLimitError.



68
69
70
71
72
73
74
75
76
# File 'lib/shipengine/exceptions.rb', line 68

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

Instance Attribute Details

#retriesObject (readonly)

Returns the value of attribute retries.



66
67
68
# File 'lib/shipengine/exceptions.rb', line 66

def retries
  @retries
end