Class: JSONAPI::Utils::Exceptions::BadRequest

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

Instance Method Summary collapse

Instance Method Details

#codeObject



96
97
98
# File 'lib/jsonapi/utils/exceptions.rb', line 96

def code
  '400'
end

#errorsObject



100
101
102
103
104
105
106
107
# File 'lib/jsonapi/utils/exceptions.rb', line 100

def errors
  [JSONAPI::Error.new(
    code: code,
    status: :bad_request,
    title: 'Bad Request',
    detail: 'This request is not supported.'
  )]
end