Exception: Grape::Exceptions::InternalServerError

Inherits:
Base
  • Object
show all
Defined in:
lib/grape/exceptions/internal_server_error.rb

Overview

Raised internally when a rescue_from handler itself raises an unrecognised exception. The framework substitutes the original exception with this safe stand-in for rendering, while preserving the original on env[Grape::Env::GRAPE_EXCEPTION] for upstream observability (loggers, error trackers, etc.).

Constant Summary

Constants inherited from Base

Base::MESSAGE_STEPS

Instance Attribute Summary

Attributes inherited from Base

#headers, #status

Instance Method Summary collapse

Methods inherited from Base

#[]

Constructor Details

#initializeInternalServerError

Returns a new instance of InternalServerError.



11
12
13
# File 'lib/grape/exceptions/internal_server_error.rb', line 11

def initialize
  super(status: 500, message: compose_message(:internal_server_error))
end