If you type an invalid Wikipedia page title into the search box you are presented with an "Oops! Something went wrong" page with the full traceback displayed. We should probably not even take users off the edit page, catching the error and keeping them there with a more helpful error notice.
Can also happen with pages which have been redirected in the meanwhile:
OAbot Oops! Something went wrong. Error: Invalid page. Traceback (most recent call last): File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/data/project/oabot/www/python/venv/local/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/data/project/oabot/www/python/src/app.py", line 150, in review_one_edit @app.route('/review-edit') File "/data/project/oabot/www/python/src/app.py", line 242, in get_one_proposed_edit File "/data/project/oabot/www/python/src/app.py", line 210, in get_proposed_edits redirect_re = re.compile(r'#REDIRECT *\[\[(.*)\]\]') File "./oabot/main.py", line 302, in get_page_over_api raise ValueError("Invalid page.") ValueError: Invalid page.
For such cases, the best prevention is having fresh suggestions.