diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionMinaImpl.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionMinaImpl.java index 56818a36c2..2385f9433c 100644 --- a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionMinaImpl.java +++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionMinaImpl.java @@ -410,7 +410,10 @@ public class NetconfSessionMinaImpl extends AbstractNetconfSession { @Override public String requestSync(String request) throws NetconfException { String reply = sendRequest(request); - checkReply(reply); + if (!checkReply(reply)) { + throw new NetconfException("Request not successful with device " + + deviceInfo + " with reply " + reply); + } return reply; } @@ -494,7 +497,10 @@ public class NetconfSessionMinaImpl extends AbstractNetconfSession { throw new NetconfTransportException(t); } else { // FIXME avoid using checkReply, error handling is weird - checkReply(reply); + if (!checkReply(reply)) { + throw new NetconfTransportException("rpc-request not successful with device " + + deviceInfo + " with reply " + reply); + } return reply; } }, SharedExecutors.getPoolThreadExecutor());