Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle some errors from the captcha generator.
The main case here is where we handle HTTPGone. The vast majority of our production tracebacks are from here where (somehow) people are loading forms that generate captchas (which works) and then way later, they are requesting those same captcha images again (over 300 seconds later.. that's like 5 minutes). I *bet* this is happening if someone has a bodhi update page open, and then their browser crashes and tries to restore its previous state, or something like that. Anyways, this patch adds a catch to that main "captcha is expired" ``InvalidToken`` traceback that is spamming our logs. It turns it into a 410 Gone statuscode, which makes sense. While testing it, I tried passing in garbage which generated a different ``TypeError`` from the base64 module, so I caught that too. Fixes #237.
- Loading branch information