Class: Glia::Errors::LimitExceededError
- 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) ⇒ LimitExceededError
constructor
A new instance of LimitExceededError.
Methods inherited from Error
Constructor Details
#initialize(resource:, max:, message: nil) ⇒ LimitExceededError
Returns a new instance of LimitExceededError.
143 144 145 146 147 148 149 150 |
# File 'lib/glia/errors/client_errors.rb', line 143 def initialize(resource:, max:, message: nil) super( type: LIMIT_EXCEEDED_ERROR, ref: "https://example.com/errors/#{LIMIT_EXCEEDED_ERROR}.html", message: "#{humanize(resource)} " + ( || "count must not exceed #{max}"), error_details: { resource: resource, max: max } ) end |