Skip to content

Fix/handle empty bot objects - #62

Merged
brd6 merged 2 commits into
mainfrom
fix/handle-empty-bot-objects
Oct 8, 2025
Merged

brd6 merged 2 commits into
mainfrom
fix/handle-empty-bot-objects

Conversation

@brd6

@brd6 brd6 commented Oct 8, 2025 •

Copy link
Copy Markdown
Owner

Description

Fixed "Undefined array key 'owner'" error when creating pages in Notion databases. The SDK now gracefully handles empty bot objects returned by the Notion API.

Motivation and context

When creating a page using pages()->create(), the Notion API returns bot users with empty bot objects in created_by and last_edited_by fields:

{
  "type": "bot",
  "bot": {}  // Empty - no owner info
}

Fix #61

How has this been tested?

  • Added unit and integration tests for empty/full bot objects
  • Added test fixture with API response

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • I have added tests to cover my changes.

@brd6
brd6 force-pushed the fix/handle-empty-bot-objects branch from f7fc90b to b91c3df Compare October 8, 2025 10:21
@brd6
brd6 merged commit 44914d3 into main Oct 8, 2025
21 checks passed
@brd6
brd6 deleted the fix/handle-empty-bot-objects branch October 8, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warning: Undefined array key "owner"

1 participant