Exception: JSONAPI::Exceptions::InvalidFieldFormat

Inherits:
Error
  • Object
show all
Defined in:
lib/jsonapi/exceptions.rb

Instance Attribute Summary

Attributes inherited from Error

#error_object_overrides

Instance Method Summary collapse

Methods inherited from Error

#create_error_object, #initialize

Constructor Details

This class inherits a constructor from JSONAPI::Exceptions::Error

Instance Method Details

#errorsObject



260
261
262
263
264
265
266
267
# File 'lib/jsonapi/exceptions.rb', line 260

def errors
  [create_error_object(code: JSONAPI::INVALID_FIELD_FORMAT,
                       status: :bad_request,
                       title: I18n.translate('jsonapi-resources.exceptions.invalid_field_format.title',
                                             default: 'Invalid field format'),
                       detail: I18n.translate('jsonapi-resources.exceptions.invalid_field_format.detail',
                                              default: 'Fields must specify a type.'))]
end