Saga Exceptions being swallowed without any logging

Hi all.

The docs for v2.x says

Since the processing is asynchronous, Exceptions cannot be propagated to the components publishing the Event. Exceptions raised by Sagas while handling an Event are logged and discarded.

However in the relevant part of the code in AsyncSagaEventProcessor

try {
} catch (Exception e) {
    RetryPolicy retryPolicy = errorHandler.onErrorInvoking(saga, entry.getPublishedEvent(),
                                                           invocationCount, e);
    if (retryPolicy.requiresRollback()) {
    requiresRetry = retryPolicy.requiresRescheduleEvent();
    if (requiresRetry && retryPolicy.waitTime() > 0) {

I can’t see any logging of the exceptions and looking at my logs I can’t find any exception logged.

I spent quite some time trying to find what happened in my code until I found out an exception being swallowed and apparently without any logging.

Is there any other place where I should look at for that logging?


Hi Antonio,

in this case, it’s the errorHandler instance that should be logging the event. The value it returns is used by the Saga Manager to decide on retrying the event, or skipping it.
The default ErrorHandler (ProceedingErrorHandler) logs the exception on error level before returning a value indicating that the SagaManager should proceed.

Where to look for the logging depends on how you have set up your loggers. Axon uses the SLF4J api to log, but it depends on the implementation you use where these logs will go.