I have a try catch block to handle an error I am getting with my application. I would like a simple way of setting the response to status code 403 or forbidden and then either redirect the user to the login page or to a custom error page.
I am having some issue with once setting the status code and the redirect. Anyone have an example of setting the status code and then redirecting?