Developer finds same URLError handling bug persisted in two files for four days after initial fix
A developer who fixed a missing URLError exception clause in one script later discovered the identical bug remained in two other files, server.py and reply_comments.py, at the time the original fix was published. The gap meant network timeouts and DNS failures raised urllib.error.URLError, a parent class that the narrower HTTPError except clause never caught, leaving errors to propagate unchecked. Two reader comments on the original post prompted the developer to confirm both files were still affected, and the finding was logged in the project's notes file on 2026-08-04. Despite being documented, the bug went unfixed across six commits and multiple coding sessions over four more days, including one that directly touched server.py. The final fix added a URLError except branch beneath the existing HTTPError handler in all three files, ensuring both HTTP-status errors and bare network failures are now caught and converted to descriptive RuntimeErrors.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in