Remove RestconfError.ErrorTag
[netconf.git] / restconf / restconf-nb-bierman02 / src / main / java / org / opendaylight / netconf / sal / restconf / impl / JSONRestconfServiceImpl.java
index 19cba39740e9f397d486f06d93907fbc0339a888..c719cc65658d6ca120a60baaf60b0f387dac2f24 100644 (file)
@@ -34,10 +34,10 @@ import org.opendaylight.netconf.sal.restconf.api.JSONRestconfService;
 import org.opendaylight.restconf.common.context.NormalizedNodeContext;
 import org.opendaylight.restconf.common.errors.RestconfDocumentedException;
 import org.opendaylight.restconf.common.errors.RestconfError;
-import org.opendaylight.restconf.common.errors.RestconfError.ErrorTag;
 import org.opendaylight.restconf.common.patch.PatchContext;
 import org.opendaylight.restconf.common.patch.PatchStatusContext;
 import org.opendaylight.restconf.common.util.SimpleUriInfo;
+import org.opendaylight.yangtools.yang.common.ErrorTag;
 import org.opendaylight.yangtools.yang.common.OperationFailedException;
 import org.opendaylight.yangtools.yang.common.RpcError;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
@@ -283,7 +283,7 @@ public class JSONRestconfServiceImpl implements JSONRestconfService {
         final RpcError[] to = new RpcError[from.size()];
         int index = 0;
         for (final RestconfError e: from) {
-            to[index++] = RpcResultBuilder.newError(e.getErrorType().toLegacy(), e.getErrorTag().getTagValue(),
+            to[index++] = RpcResultBuilder.newError(e.getErrorType().toLegacy(), e.getErrorTag().elementBody(),
                     e.getErrorMessage());
         }