Sha256: c8f98f59dbaae768d7e27eab1a03b66fea492056d855d46682c03b5375de630a
Contents?: true
Size: 551 Bytes
Versions: 10
Compression:
Stored size: 551 Bytes
Contents
module FunWithJsonApi module Exceptions # Indicates a Resource or Collection item not authorized class UnauthorizedResource < FunWithJsonApi::Exception def initialize(message, payload = ExceptionPayload.new) payload = Array.wrap(payload).each do |unauthorized| unauthorized.code ||= 'unauthorized_resource' unauthorized.title ||= I18n.t('unauthorized_resource', scope: 'fun_with_json_api.exceptions') unauthorized.status ||= '403' end super end end end end
Version data entries
10 entries across 10 versions & 1 rubygems