Method: JSONAPI::Exceptions::InvalidInclude#errors

Defined in:
lib/jsonapi/exceptions.rb

#errorsObject



359
360
361
362
363
364
365
366
367
# File 'lib/jsonapi/exceptions.rb', line 359

def errors
  [create_error_object(code: JSONAPI::INVALID_INCLUDE,
                       status: :bad_request,
                       title: I18n.translate('jsonapi-resources.exceptions.invalid_include.title',
                                             default: 'Invalid field'),
                       detail: I18n.translate('jsonapi-resources.exceptions.invalid_include.detail',
                                              default: "#{relationship} is not a valid includable relationship of #{resource}",
                                              relationship: relationship, resource: resource))]
end