Remove RestconfError.ErrorTag
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / rests / utils / FutureCallbackTx.java
index 48163eb83fd0ab24c9a61e8587e9a0102b3073dd..5ed9290f1fc2943f28f4c38b1d014f01b8a254cc 100644 (file)
@@ -111,19 +111,18 @@ final class FutureCallbackTx {
                             LOG.trace("Operation via Restconf was not executed because data at {} already exists",
                                 path);
                             throw new RestconfDocumentedException(e, new RestconfError(ErrorType.PROTOCOL,
-                                RestconfError.ErrorTag.DATA_EXISTS, "Data already exists", path));
+                                ErrorTag.DATA_EXISTS, "Data already exists", path));
                         } else if (errorTag.equals(ErrorTag.DATA_MISSING)) {
                             LOG.trace("Operation via Restconf was not executed because data at {} does not exist",
                                 path);
                             throw new RestconfDocumentedException(e, new RestconfError(ErrorType.PROTOCOL,
-                                RestconfError.ErrorTag.DATA_MISSING, "Data does not exist", path));
+                                ErrorTag.DATA_MISSING, "Data does not exist", path));
                         }
                     }
                     if (error instanceof NetconfDocumentedException) {
                         throw new RestconfDocumentedException(error.getMessage(),
                                 ((NetconfDocumentedException) error).getErrorType(),
-                                RestconfError.ErrorTag.valueOfCaseInsensitive(
-                                        ((NetconfDocumentedException) error).getErrorTag().elementBody()), e);
+                                ((NetconfDocumentedException) error).getErrorTag(), e);
                     }
                 }