Added error page and redirected my pages to it on error.