Somewhat better way of handling weird error pages