Handling all errors

Use a try and except construct, and just do a simple return. Again, this all errors means using this:

try:
    do_something()
 except Exception as e:
    pass

which is not okay. Try and figure out those errors by testing all possible cases. Use log as mentioned here and check them: