/** * Helper wrapper around {@link #handleException(Throwable, RequestInfoForLogging)} that takes in servlet request * and servlet response. The request will be wrapped in a {@link RequestInfoForLoggingServletApiAdapter} so that it * can be passed along to the method that does the work. If there are any headers in the returned {@link * ErrorResponseInfo#headersToAddToResponse} then they will be automatically added to the given servlet response, * and {@link javax.servlet.http.HttpServletResponse#setStatus(int)} will be automatically set with {@link * ErrorResponseInfo#httpStatusCode} as well. */ public ErrorResponseInfo<T> handleException(Throwable ex, HttpServletRequest servletRequest, HttpServletResponse servletResponse) { ErrorResponseInfo<T> errorResponseInfo = handleException( ex, new RequestInfoForLoggingServletApiAdapter(servletRequest) ); processServletResponse(errorResponseInfo, servletResponse); return errorResponseInfo; }