- completionStage.exceptionally(throwable -> {
- LOG.error("Leader movement failed.", throwable);
- return null;
- });
+ completionStage.exceptionally(throwable -> {
+ LOG.error("Leader movement failed.", throwable);
+ return null;
+ });
+ } catch (final DOMDataTreeProducerException e) {
+ LOG.warn("Error while closing producer", e);
+ } catch (final TimeoutException e) {
+ LOG.warn("Timeout while on producer operation", e);
+ Futures.immediateFuture(RpcResultBuilder.failed().withError(RpcError.ErrorType.RPC,
+ "resource-denied-transport", "Timeout while opening producer please retry.", "clustering-it",
+ "clustering-it", e));
+ }