mirror of
https://github.com/open-webui/oikb.git
synced 2026-10-19 07:13:34 +00:00
Handle missing Nextcloud folders gracefully (HTTP 404) (#50)
While syncing a Nextcloud source, a single missing folder currently aborts the entire sync process: PROPFIND ... failed: HTTP 404 This can happen when: a configured folder has been deleted or renamed; a shared folder is no longer available; permissions change between sync runs. Proposed change: Catch HTTPStatusError with status code 404 during folder traversal (_walk_folder). Log a warning indicating that the folder was skipped. Continue processing the remaining folders/files instead of failing the whole synchronization job.
This commit is contained in:
parent
9f2f29a6e3
commit
cf65912170
1 changed files with 8 additions and 1 deletions
|
|
@ -70,7 +70,14 @@ class _WebDAVClient:
|
|||
return
|
||||
seen_dirs.add(folder_path)
|
||||
|
||||
for entry in self._propfind(folder_path):
|
||||
try:
|
||||
children = self._propfind(folder_path)
|
||||
except httpx.HTTPStatusError as exc:
|
||||
if exc.response is not None and exc.response.status_code == 404:
|
||||
return
|
||||
raise
|
||||
|
||||
for entry in children:
|
||||
if entry.path == folder_path:
|
||||
continue
|
||||
if entry.is_collection:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue