LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
fix: Dropbox note updated and minor exception handling changes (#1178)
Chandrasekharan M67220c11a868
diff --git a/unstract/connectors/src/unstract/connectors/filesystems/zs_dropbox/exceptions.py b/unstract/connectors/src/unstract/connectors/filesystems/zs_dropbox/exceptions.pyindex bab073573..a98ae12cc 100644--- a/unstract/connectors/src/unstract/connectors/filesystems/zs_dropbox/exceptions.py+++ b/unstract/connectors/src/unstract/connectors/filesystems/zs_dropbox/exceptions.py@@ -1,3 +1,5 @@+import logging+from dropbox.auth import AuthErrorfrom dropbox.exceptions import ApiErrorfrom dropbox.exceptions import AuthError as ExcAuthError@@ -5,9 +7,11 @@ from dropbox.exceptions import DropboxExceptionfrom unstract.connectors.exceptions import ConnectorError+logger = logging.getLogger(__name__)+def handle_dropbox_exception(e: DropboxException) -> ConnectorError:- user_msg = "Error from Dropbox while testing connection: "+ user_msg = ""if isinstance(e, ExcAuthError):if isinstance(e.error, AuthError):if e.error.is_expired_access_token():@@ -22,7 +26,11 @@ def handle_dropbox_exception(e: DropboxException) -> ConnectorError:)else:user_msg += e.error._tag- elif isinstance(e, ApiError):- if e.user_message_text is not None:- user_msg += e.user_message_text+ elif isinstance(e, ApiError) and e.user_message_text is not None:+ user_msg += e.user_message_text+ else:+ logger.warning(f"Unhandled dropbox exception: {e}")+ user_msg = str(e)++ user_msg = "Error from Dropbox while testing connection\n```\n" + user_msg + "\n```"return ConnectorError(message=user_msg, treat_as_user_message=True)diff --git a/unstract/connectors/src/unstract/connectors/filesystems/zs_dropbox/static/json_schema.json b/unstract/connectors/src/unstract/connectors/filesystems/zs_dropbox/static/json_schema.jsonindex 32c8afec8..11e8d097b 100644--- a/unstract/connectors/src/unstract/connectors/filesystems/zs_dropbox/static/json_schema.json+++ b/unstract/connectors/src/unstract/connectors/filesystems/zs_dropbox/static/json_schema.json@@ -1,6 +1,6 @@{"title": "Dropbox",- "description": "A connector that allows for fetching data from your Dropbox storage. Please note that this connector is in aplha and is limited by the access token's expiry.",+ "description": "Connect to your Dropbox storage. Please note that this is currently in `alpha` and is limited by the access token's short expiry time (4 hours). Does not support OAuth yet.","type": "object","required": ["connectorName",