mirror of
https://github.com/hapifhir/hapi-fhir.git
synced 2025-02-16 18:05:19 +00:00
Forward the cause of the InvocationTargetException to the REST layer.
Discovered through #938
This commit is contained in:
parent
dcdbe51e7e
commit
eef3267bb8
@ -258,9 +258,9 @@ public abstract class BaseMethodBinding<T> {
|
||||
if (e.getCause() instanceof BaseServerResponseException) {
|
||||
throw (BaseServerResponseException) e.getCause();
|
||||
}
|
||||
throw new InternalErrorException("Failed to call access method", e);
|
||||
throw new InternalErrorException("Failed to call access method: " + e.getCause(), e);
|
||||
} catch (Exception e) {
|
||||
throw new InternalErrorException("Failed to call access method", e);
|
||||
throw new InternalErrorException("Failed to call access method: " + e.getCause(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ public class ServerWithResponseHighlightingInterceptorExceptionTest {
|
||||
ourLog.info(responseContent);
|
||||
|
||||
assertEquals(500, status.getStatusLine().getStatusCode());
|
||||
assertThat(responseContent, containsString("<diagnostics value=\"Failed to call access method\"/>"));
|
||||
assertThat(responseContent, containsString("<diagnostics value=\"Failed to call access method: java.lang.Error: AAABBB\"/>"));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user