Exception: RunApi::Core::ServerError
- Defined in:
- lib/runapi/core/errors.rb
Overview
Raised when server encounters an internal error (HTTP 5xx).
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 = "Server error", **kwargs) ⇒ ServerError
constructor
A new instance of ServerError.
Methods inherited from Error
from_response, #response_header, #runapi_task_id, #to_h
Constructor Details
#initialize(message = "Server error", **kwargs) ⇒ ServerError
Returns a new instance of ServerError.
280 281 282 283 |
# File 'lib/runapi/core/errors.rb', line 280 def initialize( = "Server error", **kwargs) kwargs[:code] = "server" unless kwargs.key?(:code) super(, status: kwargs.delete(:status) || 500, **kwargs) end |