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



111
112
113
# File 'lib/jsonapi/utils/exceptions.rb', line 111

def code
  '500'
end

#errorsObject



115
116
117
118
119
120
121
122
# File 'lib/jsonapi/utils/exceptions.rb', line 115

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