diff --git a/src/codegen/git/clients/git_repo_client.py b/src/codegen/git/clients/git_repo_client.py index aab02affe..3d2321a07 100644 --- a/src/codegen/git/clients/git_repo_client.py +++ b/src/codegen/git/clients/git_repo_client.py @@ -82,6 +82,11 @@ def get_contents(self, file_path: str, ref: str | None = None) -> str | None: except UnknownObjectException: logger.info(f"File: {file_path} not found in ref: {ref}") return None + except GithubException as e: + if e.status == 404: + logger.info(f"File: {file_path} not found in ref: {ref}") + return None + raise def get_last_modified_date_of_path(self, path: str) -> datetime: """Uses the GitHub API to return the last modified date of a given directory or file.