Skip to content

When a panic occurs, the middleware execution is not completed #1073

@jerbob92

Description

@jerbob92

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions