Exception: Fizzy::NotFoundError

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

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