Interface QueryHandlingExceptionHandler

All Superinterfaces:
MessageHandlingExceptionHandler<QueryMessage>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface QueryHandlingExceptionHandler extends MessageHandlingExceptionHandler<QueryMessage>
Handles exceptions thrown by a QueryHandler within a QueryHandlingComponent.

Return MessageStream.empty() to suppress the exception — the query returns no results. Return MessageStream.failed(Throwable) (with the same or a different exception) to let the error propagate to the caller. Return one or more QueryResponseMessage items to substitute results in place of the error.

Register via QueryHandlingModule.QueryHandlerPhase.withExceptionHandler(org.axonframework.common.configuration.ComponentBuilder).

Since:
5.2.0
Author:
Allard Buijze