Exception: Fizzy::NotFoundError
- Defined in:
- lib/fizzy/errors.rb
Overview
Raised when a resource is not found (404).
Instance Attribute Summary
Attributes inherited from Error
#cause, #code, #hint, #http_status, #request_id, #retry_after, #retryable
Instance Method Summary collapse
-
#initialize(resource, identifier, hint: nil) ⇒ NotFoundError
constructor
A new instance of NotFoundError.
Methods inherited from Error
#exit_code, exit_code_for, #retryable?
Constructor Details
#initialize(resource, identifier, hint: nil) ⇒ NotFoundError
Returns a new instance of NotFoundError.
126 127 128 129 130 131 132 133 |
# File 'lib/fizzy/errors.rb', line 126 def initialize(resource, identifier, hint: nil) super( code: ErrorCode::NOT_FOUND, message: "#{resource} not found: #{identifier}", hint: hint, http_status: 404 ) end |