I've reworked this logic (and all try/except blocks in the app) to be more reflective of what is being tested and caught.