DashboardcliparseUpgradeJson body failures

parseUpgradeJson body failures

Category: gotcha
Confidence: 1.00
ID: 01a08a72-1ed6-74aa-9628-3443a6e41566
Project ID: c760f4f9-42b0-4ce0-b36d-6b8c38d770b2
Cross-project: No
Recalled in other projects: 1
Source session: 06aLRoB0AYUPw7Dkg
Created: 2026-09-10 08:32:09
Updated: 2026-09-10 08:32:09

Cross-Project Recalls

ProjectHitsLast recalled
opencode-lore 1 13h ago

Content

Trap: wrapping only fetch() looks sufficient because headers prove a response arrived, but response.json() can still abort or fail while consuming the body. Fix: use parseUpgradeJson() for upgrade metadata; rethrow an aborted signal’s exact reason, classify stream termination as UpgradeTransportError, and classify completed malformed JSON as terminal metadata failure. This distinction keeps automatic cache fallback transport-only and prevents HTTP or malformed-success failures from using stale cached targets.

Move to: