AgentFixboard

JSON output parser returns None instead of raising on bad JSON

A chain returns None for some malformed outputs, and later code fails far from the cause.

Difficulty
Moderate
Time
~15 min
Steps
3
Fixed in
—
Last checked
2026-10-15

No upstream fix: these steps work around it. Source: issue closed (not planned) without a merged fix. Last checked 2026-10-15.

Symptom

A chain returns None for some malformed outputs, and later code fails far from the cause.

Evidence what you'll see

  • Input with mismatched brackets, such as {"a": 1}}, gives None
  • Other invalid JSON raises OutputParserException as expected

Cause

In the non-streaming path, the partial-JSON helper returns None for bracket mismatches, and that slips through as a result.

Fix steps

0 of 3 done

Your check marks stay in this browser only.

Verify the fix worked

  • Feed {"a": 1}} into your wrapper: it raises or retries instead of passing None on.
Did this fix it?

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Test in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change