Merge pull request #16 from SanteeMarcel/handle-zero-fetched-files

Raise zero files fetched error before proceeding
This commit is contained in:
Zachary Huang
2025-04-19 22:41:02 -04:00
committed by GitHub

View File

@@ -66,6 +66,8 @@ class FetchRepo(Node):
# Convert dict to list of tuples: [(path, content), ...]
files_list = list(result.get("files", {}).items())
if len(files_list) == 0:
raise(ValueError("Failed to fetch files"))
print(f"Fetched {len(files_list)} files.")
return files_list