Skip to content

Exception in .CustomAction results in losing the message #1973

@aherba-krk

Description

@aherba-krk

When using wolverine with rabbitmq, throwing an exception within .CustomAction, like this:

opts.Policies.OnAnyException().CustomAction(async (runtime, lifecycle, exception) =>
        {
            throw new Exception("Exception in custom action");
        }, "customAction");

results in wolverine losing the message, as if it was processed successfully.

I think it's due to this catch:
https://github.com/JasperFx/wolverine/blob/main/src/Wolverine/Runtime/HandlerPipeline.cs#L91

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