Exception: Snitcher::API::ResourceInvalidError
- Defined in:
- lib/snitcher/api/error.rb
Overview
ResourceInvalidError is raised when updating a resource and there are errors with the update.
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
Methods inherited from Error
Constructor Details
This class inherits a constructor from Snitcher::API::Error
Instance Method Details
#errors ⇒ Object
61 62 63 64 65 |
# File 'lib/snitcher/api/error.rb', line 61 def errors @metadata.fetch("validations", []).each_with_object({}) do |tuple, memo| memo[tuple["attribute"]] = tuple["message"] end end |