Skip to content

Commit 7e52201

Browse files
authored
fix: resolve UnboundLocalError in SharePoint connector (#552)
1 parent 88fb05b commit 7e52201

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.51
2+
3+
* **Fix SharePoint connector UnboundLocalError when site not found**
4+
15
## 1.0.50-dev0
26

37
* **Update ingest cli and docs readme files**

unstructured_ingest/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.50-dev0" # pragma: no cover
1+
__version__ = "1.0.51" # pragma: no cover

unstructured_ingest/processes/connectors/sharepoint.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def _fetch_file(self, file_data: FileData) -> DriveItem:
150150
site_drive_item = self.connection_config._get_drive_item(client_site)
151151
except ClientRequestException:
152152
logger.info("Site not found")
153+
raise SourceConnectionError(f"Site not found: {self.connection_config.site}")
153154
file = site_drive_item.get_by_path(server_relative_path).get().execute_query()
154155

155156
if not file:

0 commit comments

Comments
 (0)