Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notion Empty Property Fix #2817

Merged
merged 2 commits into from
Oct 16, 2024
Merged

Notion Empty Property Fix #2817

merged 2 commits into from
Oct 16, 2024

Conversation

yuhongsun96
Copy link
Contributor

Description

Notion connector exception handling

How Has This Been Tested?

Issue not reproducible sadly, not sure why empty properties on our own pages don't result in this issue

Accepted Risk

N/A

Related Issue(s)

N/A

Checklist:

  • All of the automated tests pass
  • All PR comments are addressed and marked resolved
  • If there are migrations, they have been rebased to latest main
  • If there are new dependencies, they are added to the requirements
  • If there are new environment variables, they are added to all of the deployment methods
  • If there are new APIs that don't require auth, they are added to PUBLIC_ENDPOINT_SPECS
  • Docker images build and basic functionalities work
  • Author has done a final read through of the PR right before merge

Copy link

vercel bot commented Oct 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 16, 2024 4:52am

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR enhances the Notion connector's exception handling for empty properties, improving its robustness when dealing with potentially missing or empty data.

  • Modified _properties_to_str method in backend/danswer/connectors/notion/connector.py to handle empty dictionaries and properties
  • Updated _read_pages_from_database method to include additional checks for empty data
  • Improved error handling in the Notion connector to prevent exceptions caused by empty properties
  • Changes focus on maintaining connector stability when encountering unexpected data structures from Notion API

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@yuhongsun96 yuhongsun96 merged commit f23a89c into main Oct 16, 2024
6 of 7 checks passed
@yuhongsun96 yuhongsun96 deleted the notion-recurse branch October 16, 2024 04:52
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.

1 participant