This part of the code catches exceptions that have not been caught
try:
return solve_for_fields(hypothesis)
except Undecidable as ex:
possible_solutions.extend(ex.considered_solutions)
reason = ex.reason
except (NoSolution, OverflowOrNone) as ex:
current_app.logger.debug("(%s)"%ex.__class__.__name__)
except (Solr, KeyboardInterrupt):
raise
except Exception as ex:
current_app.logger.error("Unhandled exception of type {0} occurred with arguments:{1!r}, thus killing a single hypothesis.".format(type(ex).__name__, ex.args))
current_app.logger.error(traceback.format_exc())
So, one exception it does not catch is a ReadTimeoutError (which happens when a request takes too long and the API closes the connection).
An addition except ReadTimeoutError rule should be added, so that only unexpected exceptions will get caught by the final step.
This part of the code catches exceptions that have not been caught
So, one exception it does not catch is a
ReadTimeoutError(which happens when a request takes too long and the API closes the connection).An addition
except ReadTimeoutErrorrule should be added, so that only unexpected exceptions will get caught by the final step.