Class: Glia::Errors::ResourceAlreadyExistsError
- Defined in:
- lib/glia/errors/client_errors.rb
Constant Summary
Constants inherited from Error
Instance Attribute Summary
Attributes inherited from Error
#error_details, #message, #ref, #type
Instance Method Summary collapse
-
#initialize(resource:, message: nil) ⇒ ResourceAlreadyExistsError
constructor
A new instance of ResourceAlreadyExistsError.
Methods inherited from Error
Constructor Details
#initialize(resource:, message: nil) ⇒ ResourceAlreadyExistsError
Returns a new instance of ResourceAlreadyExistsError.
164 165 166 167 168 169 170 171 172 173 |
# File 'lib/glia/errors/client_errors.rb', line 164 def initialize(resource:, message: nil) assert_snake_case(resource) super( type: RESOURCE_ALREADY_EXISTS_ERROR, ref: create_ref(RESOURCE_ALREADY_EXISTS_ERROR), message: || "#{humanize(resource)} already exists", error_details: { resource: resource } ) end |