From sling filter, in case of an error we are trying to send back the response code to the browser using SlingHttpServletResponse setStatus method and then forward to error page using RequestDispatcher. Please see the code below for the same -
slingResponse.setStatus(errorCode);
RequestDispatcher di...