Fixes issue #768 so that when DataFormatExceptions are thrown when using AbstractJaxRsProviders, the stacktrace will be included in the OperationOutcome details only if AbstractJaxRsProvider#withStrackTrace() is configured to return true
This commit is contained in:
parent
33f9437472
commit
b015413961
|
@ -81,7 +81,7 @@ public abstract class AbstractJaxRsProvider implements IRestfulServerDefaults {
|
|||
|
||||
private IBaseOperationOutcome createOutcome(final DataFormatException theException) {
|
||||
final IBaseOperationOutcome oo = OperationOutcomeUtil.newInstance(getFhirContext());
|
||||
final String detailsValue = theException.getMessage() + "\n\n" + ExceptionUtils.getStackTrace(theException);
|
||||
final String detailsValue = theException.getMessage() + (this.withStackTrace() ? "\n\n" + ExceptionUtils.getStackTrace(theException) : "");
|
||||
OperationOutcomeUtil.addIssue(getFhirContext(), oo, ERROR, detailsValue, null, PROCESSING);
|
||||
return oo;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue