mirror of
https://github.com/hapifhir/hapi-fhir.git
synced 2025-03-09 14:33:32 +00:00
rethrow dataformatexception in case of TargetInvocationException
This commit is contained in:
parent
6f669f9ccd
commit
a2ab3f5573
@ -26,6 +26,7 @@ import ca.uhn.fhir.interceptor.api.HookParams;
|
||||
import ca.uhn.fhir.interceptor.api.Pointcut;
|
||||
import ca.uhn.fhir.model.api.IResource;
|
||||
import ca.uhn.fhir.model.api.Include;
|
||||
import ca.uhn.fhir.parser.DataFormatException;
|
||||
import ca.uhn.fhir.rest.annotation.*;
|
||||
import ca.uhn.fhir.rest.api.MethodOutcome;
|
||||
import ca.uhn.fhir.rest.api.RestOperationTypeEnum;
|
||||
@ -251,6 +252,9 @@ public abstract class BaseMethodBinding<T> {
|
||||
if (e.getCause() instanceof BaseServerResponseException) {
|
||||
throw (BaseServerResponseException) e.getCause();
|
||||
}
|
||||
if (e.getTargetException() instanceof DataFormatException) {
|
||||
throw (DataFormatException)e.getTargetException();
|
||||
}
|
||||
throw new InternalErrorException("Failed to call access method: " + e.getCause(), e);
|
||||
} catch (Exception e) {
|
||||
throw new InternalErrorException("Failed to call access method: " + e.getCause(), e);
|
||||
|
Loading…
x
Reference in New Issue
Block a user