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.
142 143 144 145 146 147 148 149 150 151 |
# File 'lib/glia/errors/client_errors.rb', line 142 def initialize(resource:, message: nil) Naming.assert_snake_case(resource) super( type: RESOURCE_NOT_FOUND_ERROR, ref: create_ref(RESOURCE_NOT_FOUND_ERROR), message: || "#{Naming.humanize(resource)} not found", error_details: { resource: resource } ) end |