Notion Child Block Fix (#2953)

This commit is contained in:
Yuhong Sun
2024-10-27 16:25:43 -07:00
committed by GitHub
parent 2a6c032883
commit 07d76b2954

View File

@@ -134,9 +134,14 @@ class NotionConnector(LoadConnector, PollConnector):
f"This is likely due to the block not being shared " f"This is likely due to the block not being shared "
f"with the Danswer integration. Exact exception:\n\n{e}" f"with the Danswer integration. Exact exception:\n\n{e}"
) )
return None else:
logger.exception(f"Error fetching blocks - {res.json()}") logger.exception(
raise e f"Error fetching blocks with status code {res.status_code}: {res.json()}"
)
# This can occasionally happen, the reason is unknown and cannot be reproduced on our internal Notion
# Assuming this will not be a critical loss of data
return None
return res.json() return res.json()
@retry(tries=3, delay=1, backoff=2) @retry(tries=3, delay=1, backoff=2)