oo = createOperationOutcome(theException, ctx);
@Override public BaseServerResponseException preProcessOutgoingException(RequestDetails theRequestDetails, Throwable theException, HttpServletRequest theServletRequest) throws ServletException { BaseServerResponseException retVal; 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)) { retVal = new InternalErrorException(theException); } else { retVal = (BaseServerResponseException) theException; } if (retVal.getOperationOutcome() == null) { retVal.setOperationOutcome(createOperationOutcome(theException, theRequestDetails.getServer().getFhirContext())); } return retVal; }
oo = createOperationOutcome(theException, ctx);
@Override public BaseServerResponseException preProcessOutgoingException(RequestDetails theRequestDetails, Throwable theException, HttpServletRequest theServletRequest) throws ServletException { BaseServerResponseException retVal; 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)) { retVal = new InternalErrorException(theException); } else { retVal = (BaseServerResponseException) theException; } if (retVal.getOperationOutcome() == null) { retVal.setOperationOutcome(createOperationOutcome(theException, theRequestDetails.getServer().getFhirContext())); } return retVal; }