Exception: JSONAPI::Exceptions::InternalServerError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exception) ⇒ InternalServerError

Returns a new instance of InternalServerError.



8
9
10
# File 'lib/jsonapi/exceptions.rb', line 8

def initialize(exception)
  @exception = exception
end

Instance Attribute Details

#exceptionObject

Returns the value of attribute exception.



6
7
8
# File 'lib/jsonapi/exceptions.rb', line 6

def exception
  @exception
end

Instance Method Details

#errorsObject



12
13
14
15
16
17
# File 'lib/jsonapi/exceptions.rb', line 12

def errors
  [JSONAPI::Error.new(code: JSONAPI::INTERNAL_SERVER_ERROR,
                      status: :internal_server_error,
                      title: 'Internal Server Error',
                      detail: 'Internal Server Error')]
end