Merge "Propagate error status codes correctly" into stable/fluorine
authorJakub Morvay <jakub.morvay@gmail.com>
Wed, 16 Jan 2019 11:54:10 +0000 (11:54 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 16 Jan 2019 11:54:10 +0000 (11:54 +0000)
restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/errors/RestconfDocumentedException.java

index 3f1f458fb31540fca75217b6c699ddd43a93fa63..fc1773e86d0b719d022c95eac9eef27626388edd 100644 (file)
@@ -156,7 +156,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;