Propagate error status codes correctly
[netconf.git] / restconf / restconf-common / src / main / java / org / opendaylight / restconf / common / errors / RestconfDocumentedException.java
index b6dcf42559d00b6b99fc71dc4d9db69ea13afdb0..30e1615d88f0ad403221c7dd4b26faf46066d56d 100644 (file)
@@ -157,7 +157,7 @@ public class RestconfDocumentedException extends WebApplicationException {
     }
 
     public RestconfDocumentedException(final Throwable cause, final RestconfError error) {
-        super(cause);
+        super(cause, error.getErrorTag().getStatusCode());
         Preconditions.checkNotNull(error, "RestconfError can't be null");
         errors = ImmutableList.of(error);
         status = null;