Class ExceptionHandlingInterceptor
java.lang.Object
ca.uhn.fhir.rest.server.interceptor.ExceptionHandlingInterceptor
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionhandleException
(RequestDetails theRequestDetails, ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException theException) boolean
handleException
(RequestDetails theRequestDetails, ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException theException, jakarta.servlet.http.HttpServletRequest theRequest, jakarta.servlet.http.HttpServletResponse theResponse) ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException
preProcessOutgoingException
(RequestDetails theRequestDetails, Throwable theException, jakarta.servlet.http.HttpServletRequest theServletRequest) setReturnStackTracesForExceptionTypes
(Class<?>... theExceptionTypes) If any server methods throw an exception which extends any of the given exception types, the exception stack trace will be returned to the user.
-
Field Details
-
PROCESSING
- See Also:
-
SUMMARY_MODE
-
-
Constructor Details
-
ExceptionHandlingInterceptor
public ExceptionHandlingInterceptor()
-
-
Method Details
-
handleException
public boolean handleException(RequestDetails theRequestDetails, ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException theException, jakarta.servlet.http.HttpServletRequest theRequest, jakarta.servlet.http.HttpServletResponse theResponse) throws jakarta.servlet.ServletException, IOException - Throws:
jakarta.servlet.ServletException
IOException
-
handleException
public Object handleException(RequestDetails theRequestDetails, ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException theException) throws jakarta.servlet.ServletException, IOException - Throws:
jakarta.servlet.ServletException
IOException
-
preProcessOutgoingException
public ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException preProcessOutgoingException(RequestDetails theRequestDetails, Throwable theException, jakarta.servlet.http.HttpServletRequest theServletRequest) throws jakarta.servlet.ServletException - Throws:
jakarta.servlet.ServletException
-
setReturnStackTracesForExceptionTypes
public ExceptionHandlingInterceptor setReturnStackTracesForExceptionTypes(Class<?>... theExceptionTypes) If any server methods throw an exception which extends any of the given exception types, the exception stack trace will be returned to the user. This can be useful for helping to diagnose issues, but may not be desirable for production situations.- Parameters:
theExceptionTypes
- The exception types for which to return the stack trace to the user.- Returns:
- Returns an instance of this interceptor, to allow for easy method chaining.
-