Class: Glia::Errors::ResourceMinimumNotReachedError
- 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:, min:, message: nil) ⇒ ResourceMinimumNotReachedError
constructor
A new instance of ResourceMinimumNotReachedError.
Methods inherited from Error
Constructor Details
#initialize(resource:, min:, message: nil) ⇒ ResourceMinimumNotReachedError
Returns a new instance of ResourceMinimumNotReachedError.
198 199 200 201 202 203 204 205 206 207 |
# File 'lib/glia/errors/client_errors.rb', line 198 def initialize(resource:, min:, message: nil) Naming.assert_snake_case(resource) super( type: RESOURCE_MINIMUM_NOT_REACHED, ref: create_ref(RESOURCE_MINIMUM_NOT_REACHED), message: || "#{Naming.humanize(resource)} count must reach at least #{min}", error_details: { resource: resource, min: min } ) end |