Search in sources :

Example 1 with CommandException

use of io.spine.server.commandbus.CommandException in project core-java by SpineEventEngine.

the class CommandService method handleUnsupported.

private static void handleUnsupported(Command request, StreamObserver<Response> responseObserver) {
    final CommandException unsupported = new UnsupportedCommandException(request);
    log().error("Unsupported command posted to CommandService", unsupported);
    responseObserver.onError(invalidArgumentWithCause(unsupported, unsupported.getError()));
}
Also used : UnsupportedCommandException(io.spine.server.commandbus.UnsupportedCommandException) UnsupportedCommandException(io.spine.server.commandbus.UnsupportedCommandException) CommandException(io.spine.server.commandbus.CommandException)

Aggregations

CommandException (io.spine.server.commandbus.CommandException)1 UnsupportedCommandException (io.spine.server.commandbus.UnsupportedCommandException)1