Class: Glia::Errors::ResourceLimitExceededError
- 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:, max:, message: nil) ⇒ ResourceLimitExceededError
constructor
A new instance of ResourceLimitExceededError.
Methods inherited from Error
Constructor Details
#initialize(resource:, max:, message: nil) ⇒ ResourceLimitExceededError
Returns a new instance of ResourceLimitExceededError.
185 186 187 188 189 190 191 192 193 194 |
# File 'lib/glia/errors/client_errors.rb', line 185 def initialize(resource:, max:, message: nil) Naming.assert_snake_case(resource) super( type: RESOURCE_LIMIT_EXCEEDED_ERROR, ref: create_ref(RESOURCE_LIMIT_EXCEEDED_ERROR), message: || "#{Naming.humanize(resource)} count must not exceed #{max}", error_details: { resource: resource, max: max } ) end |