Class: Glia::Errors::ResourceAlreadyExistsError
- 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) ⇒ ResourceAlreadyExistsError
constructor
A new instance of ResourceAlreadyExistsError.
Methods inherited from Error
Constructor Details
#initialize(resource:, message: nil) ⇒ ResourceAlreadyExistsError
154 155 156 157 158 159 160 161 |
# File 'lib/glia/errors/client_errors.rb', line 154 def initialize(resource:, message: nil) super( type: RESOURCE_ALREADY_EXISTS_ERROR, ref: "https://example.com/errors/#{RESOURCE_ALREADY_EXISTS_ERROR}.html", message: "#{humanize(resource)} " + ( || 'already exists'), error_details: { resource: resource } ) end |