class FunWithJsonApi::Exceptions::IllegalClientGeneratedIdentifier
A server MUST return 403 Forbidden in response to an unsupported request to create a resource with a client-generated ID.
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/illegal_client_generated_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 ||= '403' payload.pointer ||= '/data/id' super end