[ONOS-7766] Modify the use of invalidated checkReply methods in Netconf

Change-Id: I4400c33373a93926bcc8a397db4f24e141790b63
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 56818a3..2385f94 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 @@
     @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 @@
                             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());