use of io.spine.server.commandbus.UnsupportedCommandException 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()));
}
use of io.spine.server.commandbus.UnsupportedCommandException in project core-java by SpineEventEngine.
the class CommandService method handleUnsupported.
private static void handleUnsupported(Command request, StreamObserver<Ack> responseObserver) {
final UnsupportedCommandException unsupported = new UnsupportedCommandException(request);
log().error("Unsupported command posted to CommandService", unsupported);
final Error error = unsupported.asError();
final Ack response = reject(request.getId(), error);
responseObserver.onNext(response);
responseObserver.onCompleted();
}
Aggregations