Exception: Snitcher::API::ResourceInvalidError

Inherits:
Error
  • Object
show all
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

#type

Instance Method Summary collapse

Methods inherited from Error

#initialize, new

Constructor Details

This class inherits a constructor from Snitcher::API::Error

Instance Method Details

#errorsObject



64
65
66
67
68
# File 'lib/snitcher/api/error.rb', line 64

def errors
  .fetch("validations", []).each_with_object({}) do |tuple, memo|
    memo[tuple["attribute"]] = tuple["message"]
  end
end