Dashboard › cli › parseUpgradeJson body failures
01a08a72-1ed6-74aa-9628-3443a6e41566| Project | Hits | Last recalled |
|---|---|---|
| opencode-lore | 1 | 13h ago |
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.