Exception: RunApi::Core::InsufficientCreditsError
- Defined in:
- lib/runapi/core/errors.rb
Overview
Raised when account has insufficient credits (HTTP 402).
Constant Summary
Constants inherited from Error
Error::DEFAULT_MESSAGES, Error::STATUS_MAP
Instance Attribute Summary
Attributes inherited from Error
#code, #details, #request_id, #response_headers, #status
Instance Method Summary collapse
-
#initialize(message = "Insufficient credits", **kwargs) ⇒ InsufficientCreditsError
constructor
A new instance of InsufficientCreditsError.
Methods inherited from Error
from_response, #response_header, #runapi_task_id, #to_h
Constructor Details
#initialize(message = "Insufficient credits", **kwargs) ⇒ InsufficientCreditsError
Returns a new instance of InsufficientCreditsError.
208 209 210 211 |
# File 'lib/runapi/core/errors.rb', line 208 def initialize( = "Insufficient credits", **kwargs) kwargs[:code] = "insufficient_credits" unless kwargs.key?(:code) super(, status: 402, **kwargs) end |