mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-09-27 20:38:32 +02:00
Fix file too large error (#2799)
* Fix file too large error * Add cannotDownloadFile
This commit is contained in:
@@ -475,7 +475,15 @@ class GoogleDriveConnector(LoadConnector, PollConnector):
|
||||
if e.error_details
|
||||
else e.reason
|
||||
)
|
||||
if e.status_code == 403 and reason == "cannotExportFile":
|
||||
|
||||
# these errors don't represent a failure in the connector, but simply files
|
||||
# that can't / shouldn't be indexed
|
||||
ERRORS_TO_CONTINUE_ON = [
|
||||
"cannotExportFile",
|
||||
"exportSizeLimitExceeded",
|
||||
"cannotDownloadFile",
|
||||
]
|
||||
if e.status_code == 403 and reason in ERRORS_TO_CONTINUE_ON:
|
||||
logger.warning(
|
||||
f"Could not export file '{file['name']}' due to '{message}', skipping..."
|
||||
)
|
||||
|
Reference in New Issue
Block a user