Class: Glia::Errors::ResourceNotFoundError
- Defined in:
- lib/glia/errors/client_errors.rb
Instance Attribute Summary
Attributes inherited from Error
#error_details, #message, #ref, #type
Instance Method Summary collapse
-
#initialize(resource:, message: nil) ⇒ ResourceNotFoundError
constructor
A new instance of ResourceNotFoundError.
Methods inherited from Error
Constructor Details
#initialize(resource:, message: nil) ⇒ ResourceNotFoundError
Returns a new instance of ResourceNotFoundError.
106 107 108 109 110 111 112 113 |
# File 'lib/glia/errors/client_errors.rb', line 106 def initialize(resource:, message: nil) super( type: RESOURCE_NOT_FOUND_ERROR, ref: "https://example.com/errors/#{RESOURCE_NOT_FOUND_ERROR}.html", message: "#{humanize(resource)} " + ( || 'not found'), error_details: { resource: resource } ) end |