Exception: Basecamp::NotFoundError
- Defined in:
- lib/basecamp/not_found_error.rb
Overview
Raised when a resource is not found (404).
Instance Method Summary collapse
-
#initialize(resource = nil, identifier = nil, message: nil, hint: nil) ⇒ NotFoundError
constructor
A new instance of NotFoundError.
Constructor Details
#initialize(resource = nil, identifier = nil, message: nil, hint: nil) ⇒ NotFoundError
Returns a new instance of NotFoundError.
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/basecamp/not_found_error.rb', line 6 def initialize(resource = nil, identifier = nil, message: nil, hint: nil) ||= if resource "#{resource} not found: #{identifier}" else "Not found" end super( code: ErrorCode::NOT_FOUND, message: , hint: hint, http_status: 404 ) end |