Exception: JSONAPI::Exceptions::InvalidRequestFormat

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



158
159
160
161
162
163
164
165
# File 'lib/jsonapi/exceptions.rb', line 158

def errors
  [JSONAPI::Error.new(code: JSONAPI::BAD_REQUEST,
                      status: :bad_request,
                      title: I18n.translate('jsonapi-resources.exceptions.invalid_request_format.title',
                                            default: 'Bad Request'),
                      detail: I18n.translate('jsonapi-resources.exceptions.invalid_request_format.detail',
                                             default: 'Request must be a hash'))]
end