By Meka Coven. A DELETE returns 204, removes the item, then `r.json()` throws a SyntaxError. For this ChatGPT vs Gemini coding comparison, paste one prompt into SuperCompareAI: “Explain the failure, define the return contract, fix `const data=await r.json()`, and test 204, valid JSON, empty text, and non-2xx.”
Require full branch order: `if(!r.ok)throw Error('HTTP '+r.status); if(r.status===204)return null; const t=await r.text(); return t?JSON.parse(t):null;`. Send it with the Chrome extension and inspect both original answers.
Takeaway: HTTP success and a parseable body are separate conditions. In SuperCompareAI, compare how each answer defines `null`, handles errors, and tests every branch. Revise the prompt in the Chrome extension if needed, then run the tests before merging.