Skip to content

Notion error paths silently convert failures to {} #452

@fadeev

Description

@fadeev

Priority: High

Several Notion integration points use .catch(() => ({})), which turns real failures (auth errors, rate limits, network) into empty objects. Downstream code then reads missing fields and produces cryptic "cannot read property of undefined" errors far from the original failure.

Locations

Suggested fix

Introduce a NotionError extends Error class that preserves status/cause, throw it from the catch handlers, and let callers decide how to recover. Log at the catch site with enough context to diagnose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions