class FunWithJsonApi::Exceptions::UnauthorizedRelationship

Indicates a supplied relationship value is known but unable to be changed by this endpoint

Public Class Methods

new(message, payload = ExceptionPayload.new) click to toggle source
Calls superclass method FunWithJsonApi::Exception::new
# File lib/fun_with_json_api/exceptions/unauthorized_relationship.rb, line 5
def initialize(message, payload = ExceptionPayload.new)
  payload = Array.wrap(payload).each do |unknown|
    unknown.code ||= 'unauthorized_relationship'
    unknown.title ||= I18n.t(
      :unauthorized_relationship, scope: 'fun_with_json_api.exceptions'
    )
    unknown.status ||= '403'
  end
  super
end