What's Changed
Reliability
-
Edge-proxy blocks are now a diagnosable error (#751)
- When a request is rejected at the network edge (for example by a network security rule), the response is often HTML rather than a Notion error body. The SDK already fell back to
UnknownHTTPResponseError, but the generic message and raw HTML made these failures hard to diagnose. The HTTP error types now carry response diagnostics:ray_idis populated from thecf-rayresponse header whenever present, andrequest_idfalls back to thex-notion-request-idheader when the body doesn't provide one. An unrecognized response with a Ray ID but no Notion request ID is identified as edge-generated, and 403s note that a network security rule may be responsible. - Well-formed Notion API errors still take precedence, and no new error class is introduced — the
NotionClientErrorunion is unchanged. - Also fixes
retry-afterheader lookup to be case-insensitive for plain-object headers and to handle array-valued headers. - If you hit opaque
UnknownHTTPResponseErrors with HTML bodies: upgrade, then include the error'sray_idandrequest_idwhen reporting the issue — no code changes needed.
- When a request is rejected at the network edge (for example by a network security rule), the response is often HTML rather than a Notion error body. The SDK already fell back to
-
Bump version to v5.23.3 (#752)
Links
- Full Changelog: v5.23.2...v5.23.3
- NPM Package: https://www.npmjs.com/package/@notionhq/client/v/5.23.3