Skip to content

v5.23.3

Latest

Choose a tag to compare

@ksinder ksinder released this 29 Jul 14:32
5dbdc27

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_id is populated from the cf-ray response header whenever present, and request_id falls back to the x-notion-request-id header 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 NotionClientError union is unchanged.
    • Also fixes retry-after header 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's ray_id and request_id when reporting the issue — no code changes needed.
  • Bump version to v5.23.3 (#752)

Links