{
  "id": 292851,
  "title": "The JSON Error That Hid the Real Failure",
  "url": "https://urgent.news/2026/08/08/the-json-error-that-hid-the-real-failure",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-08T03:38:57.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/relaunchdept/the-json-error-that-hid-the-real-failure-5da6"
  },
  "original_language": "en",
  "account": "A migration audit tool failed unexpectedly in a test case, presenting the wrong error message. The issue arose from a Python script designed to convert a GitHub discussion into an Open Knowledge Format bundle and run a migration dry run. The script produced a JSON receipt, but when the audit failed without producing valid JSON, the script masked the original error and did not write the receipt. This led to a third failure scenario, where the audit process exited with a non-zero status but produced plain text instead of JSON. To address this, the code was updated to handle two independent signals: the process's success and the validity of its JSON output. The updated code first checked for successful process execution and valid JSON, then raised the appropriate exception with the correct exit code. If the JSON parsing failed, the original process error was raised, preserving the diagnostic information. The fix ensures that when the pipeline fails, its diagnostic contract is reliable, with explicit regression tests verifying both failure modes. After the fix, the test suite passed successfully, and a real data round trip demonstrated zero removed or changed fields. The most important outcome is that when the pipeline fails, its diagnostic contract is now trustworthy.",
  "summary": "This is a submission for DEV's Summer Bug Smash: Smash Stories powered by Sentry . A migration audit should fail loudly when data is lost. Mine failed loudly too—but, in one edge case, it reported the wrong failure . The bug lived in a one-command Python showcase built for an open-source Memanto contribution. The command turns a real GitHub discussion into an Open Knowledge Format bundle, runs…",
  "key_points": [
    "Python script masked original error, produced plain text instead of JSON",
    "Updated code handled two independent signals: process success and JSON validity",
    "Fix ensured reliable diagnostic contract with explicit regression tests"
  ],
  "editors_take": "The updated code ensures a reliable diagnostic contract when the pipeline fails, allowing for trustworthy identification of the original error and preserving diagnostic information.",
  "illustration": "https://urgent.news/ill/292851.png",
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}