Timed-out API fetch silently wrote an empty array, and tests locked in the wrong result
A developer's scraper reported that a GitHub repository had zero closed pull requests, though it actually had dozens. A curl request with a 25-second limit was cut off mid-transfer on a large response, leaving a partial JSON fragment that the parser failed on. The error was swallowed and an empty array was written to disk, which was then cited as evidence. The author argues the pipeline lacked a way to represent 'unknown' versus 'none', and that tests asserting counts or fixtures captured from live data can pass while hiding such bugs. The article recommends explicit failure signaling, named error details, and tests that assert the specific field that can be wrong.
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