mirror of
https://github.com/The-Pocket/PocketFlow-Tutorial-Codebase-Knowledge.git
synced 2026-08-31 01:20:32 +08:00
fix(utils/crawl_github_files): error message
The formatted error messages that use undefined variables are fixed and their contents are changed.
This commit is contained in:
@@ -151,12 +151,12 @@ def crawl_github_files(
|
|||||||
print(f"Error 404: Repository not found or is private.\n"
|
print(f"Error 404: Repository not found or is private.\n"
|
||||||
f"If this is a private repository, please provide a valid GitHub token via the 'token' argument or set the GITHUB_TOKEN environment variable.")
|
f"If this is a private repository, please provide a valid GitHub token via the 'token' argument or set the GITHUB_TOKEN environment variable.")
|
||||||
else:
|
else:
|
||||||
print(f"Error 404: Path '{path}' not found in repository or insufficient permissions with the provided token.\n"
|
print(f"Error 404: Repository not found or insufficient permissions with the provided token.\n"
|
||||||
f"Please verify the token has access to this repository and the path exists.")
|
f"Please verify the repository exists and the token has access to this repository.")
|
||||||
return []
|
return []
|
||||||
|
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
print(f"Error fetching {path}: {response.status_code} - {response.text}")
|
print(f"Error fetching the branches of {owner}/{path}: {response.status_code} - {response.text}")
|
||||||
return []
|
return []
|
||||||
|
|
||||||
return response.json()
|
return response.json()
|
||||||
|
|||||||
Reference in New Issue
Block a user