public RestconfDocumentedException(final String message, final ErrorType errorType, final ErrorTag errorTag,
final Throwable cause) {
this(cause, new RestconfError(errorType, errorTag, message, null,
- Throwables.getStackTraceAsString(cause), null));
+ cause.getMessage(), null));
}
/**
/**
* Constructs an instance with an error message and exception cause.
- * The stack trace of the exception is included in the error info.
+ * The underlying exception is included in the error-info.
*
* @param message
* A string which provides a plain text string describing the error.
*/
public RestconfDocumentedException(final String message, final Throwable cause) {
this(cause, new RestconfError(RestconfError.ErrorType.APPLICATION, RestconfError.ErrorTag.OPERATION_FAILED,
- message, null, Throwables.getStackTraceAsString(cause), null));
+ message, null, cause.getMessage(), null));
}
/**
final Optional<String> patchResult = this.service.patch(uriPath, payload);
assertTrue("Patch output is not null", patchResult.isPresent());
String patch = patchResult.get();
- assertTrue(patch.contains("TransactionCommitFailedException"));
+ assertTrue(patch.contains("mock"));
}
@Test