Class: JSONAPI::Utils::Exceptions::InternalServerError

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

Instance Method Summary collapse

Instance Method Details

#codeObject



39
# File 'lib/jsonapi/utils/exceptions.rb', line 39

def code; '500' end

#errorsObject



41
42
43
44
45
46
47
48
# File 'lib/jsonapi/utils/exceptions.rb', line 41

def errors
  [JSONAPI::Error.new(
    code: code,
    status: :internal_server_error,
    title: 'Internal Server Error',
    detail: 'An internal error ocurred while processing the request.'
  )]
end