Class ExceptionHandlingInterceptor

java.lang.Object
ca.uhn.fhir.rest.server.interceptor.ExceptionHandlingInterceptor

  • Field Details

  • Constructor Details

  • 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

      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.