Handle 404 and other errors with custom view