In my ASP.NET web application, I have defined custom error pages in my web.config file as follows:
You could just send your own url params to the error page