When triggering a panic from a worker, this panic will only cause HandlePanic in the error handler to be called, but it will not continue execution in the middleware. I would like to see this behaviour changed so that panics are just a typed error after HandlePanic.
Without this, the middleware will never see the panic so then it will also not reported to Sentry as error and/or transaction without duplicating the code.
I also noticed that the context that is given in the panic handler is different and doesn't contain the context added by the middleware.