releases.shpreview

Non-JSON errors surface as typed Context7Error

@upstash/context7-sdk@0.3.1

1 fixThis release1 fixBug fixesAI-tallied from the release notes

Patch Changes

  • f327589: Avoid throwing a raw SyntaxError when the server returns a non-JSON error body. HttpClient.request() now wraps the error-path res.json() in a .catch, so non-JSON responses (HTML 502s, plain-text 429s, Cloudflare challenge pages) fall back to res.statusText and always surface as a typed Context7Error.

Fetched June 11, 2026