Sha256: cb4e90a5b9f716ee804160ad2fbdb9cc697f52355ce42c6c3fac6ebbe69b048e
Contents?: true
Size: 527 Bytes
Versions: 11
Compression:
Stored size: 527 Bytes
Contents
module FunWithJsonApi module Exceptions # Indicates a supplied attribute value is unknown to the current deserializer class UnknownAttribute < FunWithJsonApi::Exception def initialize(message, payload = ExceptionPayload.new) payload = Array.wrap(payload).each do |unknown| unknown.code ||= 'unknown_attribute' unknown.title ||= I18n.t(:unknown_attribute, scope: 'fun_with_json_api.exceptions') unknown.status ||= '422' end super end end end end
Version data entries
11 entries across 11 versions & 1 rubygems