Exception: RunApi::Core::ServerError

Inherits:
Error
  • Object
show all
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

#details, #request_id, #status

Instance Method Summary collapse

Methods inherited from Error

from_response, #to_h

Constructor Details

#initialize(message = "Server error", **kwargs) ⇒ ServerError

Returns a new instance of ServerError.



241
242
243
# File 'lib/runapi/core/errors.rb', line 241

def initialize(message = "Server error", **kwargs)
  super(message, status: kwargs.delete(:status) || 500, **kwargs)
end