All RestconfDocumentedExceptions were being incorrectly
reported with status code 50x since the status code was not
correctly forwared to the underlying WebApplicationException.
Change-Id: Ibe53c560053607abff665a2f36a524dece51a2fc
JIRA: NETCONF-511
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
}
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;