Class: Glia::Errors::InvalidResourceStateError
- 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:, state:, message: nil) ⇒ InvalidResourceStateError
constructor
A new instance of InvalidResourceStateError.
Methods inherited from Error
Constructor Details
#initialize(resource:, state:, message: nil) ⇒ InvalidResourceStateError
Returns a new instance of InvalidResourceStateError.
165 166 167 168 169 170 171 172 |
# File 'lib/glia/errors/client_errors.rb', line 165 def initialize(resource:, state:, message: nil) super( type: INVALID_RESOURCE_STATE_ERROR, ref: "https://example.com/errors/#{INVALID_RESOURCE_STATE_ERROR}.html", message: "#{humanize(resource)} " + ( || "is in invalid state: #{state}"), error_details: { resource: resource, state: state } ) end |