From 8785a518575f896fcb2ba9f79dd26d57094366fc Mon Sep 17 00:00:00 2001 From: Tadgh Date: Tue, 23 Mar 2021 19:50:05 -0400 Subject: [PATCH] Remove janky interceptor hook --- .../server/interceptor/ExceptionHandlingInterceptor.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ExceptionHandlingInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ExceptionHandlingInterceptor.java index 9192543b3eb..68b6d4225f8 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ExceptionHandlingInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ExceptionHandlingInterceptor.java @@ -107,10 +107,7 @@ public class ExceptionHandlingInterceptor { @Hook(Pointcut.SERVER_PRE_PROCESS_OUTGOING_EXCEPTION) public BaseServerResponseException preProcessOutgoingException(RequestDetails theRequestDetails, Throwable theException, HttpServletRequest theServletRequest) throws ServletException { BaseServerResponseException retVal; - //TODO GGG this is _not_ the fix. - if (theException instanceof InternalErrorException && theException.getCause().getCause() instanceof DataFormatException) { - retVal = new InvalidRequestException(theException.getCause().getCause()); - } else if (theException instanceof DataFormatException) { + if (theException instanceof DataFormatException) { // Wrapping the DataFormatException as an InvalidRequestException so that it gets sent back to the client as a 400 response. retVal = new InvalidRequestException(theException); } else if (!(theException instanceof BaseServerResponseException)) {