Exception: JSONAPI::Exceptions::InvalidDataFormat

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



271
272
273
274
275
276
277
278
# File 'lib/jsonapi/exceptions.rb', line 271

def errors
  [create_error_object(code: JSONAPI::INVALID_DATA_FORMAT,
                       status: :bad_request,
                       title: I18n.translate('jsonapi-resources.exceptions.invalid_data_format.title',
                                             default: 'Invalid data format'),
                       detail: I18n.translate('jsonapi-resources.exceptions.invalid_data_format.detail',
                                              default: 'Data must be a hash.'))]
end