handler.handleRequest(requestId, request).whenComplete((resp, throwable) -> { try { if (throwable != null) { throw new BadRequestException(handler.getServerName(), "NULL returned for request with ID " + requestId + ".");
handlerShutdownFuture.complete(null); } else { handler.shutdown().whenComplete((result, throwable) -> { if (throwable != null) { handlerShutdownFuture.completeExceptionally(throwable);
handler.handleRequest(requestId, request).whenComplete((resp, throwable) -> { try { if (throwable != null) { throw new BadRequestException(handler.getServerName(), "NULL returned for request with ID " + requestId + ".");
handlerShutdownFuture.complete(null); } else { handler.shutdown().whenComplete((result, throwable) -> { if (throwable != null) { handlerShutdownFuture.completeExceptionally(throwable);
handler.handleRequest(requestId, request).whenComplete((resp, throwable) -> { try { if (throwable != null) { throw new BadRequestException(handler.getServerName(), "NULL returned for request with ID " + requestId + ".");
handlerShutdownFuture.complete(null); } else { handler.shutdown().whenComplete((result, throwable) -> { if (throwable != null) { handlerShutdownFuture.completeExceptionally(throwable);