Merge "Propagate error status codes correctly"
authorJakub Morvay <jakub.morvay@gmail.com>
Wed, 16 Jan 2019 12:44:40 +0000 (12:44 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 16 Jan 2019 12:44:40 +0000 (12:44 +0000)
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;