Sha256: 65d6803090cd28e2aa85bdd895e6eae62d65ec762f4011c01105ac19f50d1549
Contents?: true
Size: 518 Bytes
Versions: 5
Compression:
Stored size: 518 Bytes
Contents
module FunWithJsonApi module Exceptions # Indicates a Resource was unable to be used with performing an update class InvalidResource < FunWithJsonApi::Exception def initialize(message, payload = ExceptionPayload.new) payload = Array.wrap(payload).each do |invalid| invalid.code ||= 'invalid_resource' invalid.title ||= I18n.t('invalid_resource', scope: 'fun_with_json_api.exceptions') invalid.status ||= '422' end super end end end end
Version data entries
5 entries across 5 versions & 1 rubygems