Exception: JSONAPI::Exceptions::InvalidFieldFormat

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

Instance Method Summary collapse

Instance Method Details

#errorsObject


197
198
199
200
201
202
203
204
# File 'lib/jsonapi/exceptions.rb', line 197

def errors
  [JSONAPI::Error.new(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