in lib/aws_lambda_ric.rb [81:106]
def run_user_code(lambda_invocation_request)
context = LambdaContext.new(lambda_invocation_request.raw_request)
handler_response, content_type = @lambda_handler.call_handler(
request: lambda_invocation_request.request,
context: context
)
@lambda_server.send_response(
request_id: lambda_invocation_request.request_id,
response_object: handler_response,
content_type: content_type
)
rescue LambdaErrors::LambdaHandlerError => e
LambdaLogger.log_error(exception: e, message: 'Error raised from handler method')
send_error_response(lambda_invocation_request, e)
rescue LambdaErrors::LambdaHandlerCriticalException => e
LambdaLogger.log_error(exception: e, message: 'Critical exception from handler')
send_error_response(lambda_invocation_request, e, -1, false)
rescue LambdaErrors::LambdaRuntimeError => e
send_error_response(lambda_invocation_request, e, -2, false)
end