Skip to content

Commit ccd0481

Browse files
committed
fix(utils/crawl_github_files): error message
The formatted error messages that use undefined variables are fixed and their contents are changed.
1 parent 03555ca commit ccd0481

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils/crawl_github_files.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,12 @@ def fetch_branches(owner: str, repo: str):
151151
print(f"Error 404: Repository not found or is private.\n"
152152
f"If this is a private repository, please provide a valid GitHub token via the 'token' argument or set the GITHUB_TOKEN environment variable.")
153153
else:
154-
print(f"Error 404: Path '{path}' not found in repository or insufficient permissions with the provided token.\n"
155-
f"Please verify the token has access to this repository and the path exists.")
154+
print(f"Error 404: Repository not found or insufficient permissions with the provided token.\n"
155+
f"Please verify the repository exists and the token has access to this repository.")
156156
return []
157157

158158
if response.status_code != 200:
159-
print(f"Error fetching {path}: {response.status_code} - {response.text}")
159+
print(f"Error fetching the branches of {owner}/{path}: {response.status_code} - {response.text}")
160160
return []
161161

162162
return response.json()

0 commit comments

Comments
 (0)