class FunWithJsonApi::Exceptions::InvalidDocumentIdentifier

A server MUST return 409 Conflict when processing a PATCH request in which the resource object’s type and id do not match the server’s endpoint

Constants

EXCEPTION_CODE

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/invalid_document_identifier.rb, line 8
def initialize(message, payload = ExceptionPayload.new)
  payload.code ||= EXCEPTION_CODE
  payload.title ||= I18n.t(EXCEPTION_CODE, scope: 'fun_with_json_api.exceptions')
  payload.status ||= '409'
  payload.pointer ||= '/data/id'
  super
end