Exception: RunApi::Core::NotFoundError

Inherits:
Error
  • Object
show all
Defined in:
lib/runapi/core/errors.rb

Overview

Raised when requested resource does not exist (HTTP 404).

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

Methods inherited from Error

from_response, #response_header, #runapi_task_id, #to_h

Constructor Details

#initialize(message = "Not found", **kwargs) ⇒ NotFoundError

Returns a new instance of NotFoundError.



216
217
218
219
# File 'lib/runapi/core/errors.rb', line 216

def initialize(message = "Not found", **kwargs)
  kwargs[:code] = "not_found" unless kwargs.key?(:code)
  super(message, status: 404, **kwargs)
end