module Sentry::Puma::Server
def lowlevel_error(e, env, status = 500)
def lowlevel_error(e, env, status = 500) result = if PUMA_4_AND_PRIOR super(e, env) else super end begin Sentry.capture_exception(e) do |scope| scope.set_rack_env(env) end rescue # if anything happens, we don't want to break the app end result end