@upstash/context7-sdk@0.3.1
microsoft/markitdown@upstash/context7-sdk@0.3.1Jun 11, 2026by github-actions[bot]
AI Summary
This patch improves error handling by catching non-JSON responses (such as HTML error pages or plain text status codes) and converting them into a typed Context7Error.
Key Highlights
- Improved error handling for non-JSON responses
- Wraps error-path res.json() in a .catch
- Surfaces Context7Error for HTML 502s, 429s, etc.
New Features
- Robust error handling for non-JSON HTTP errors
Full 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`.