Skip to content

Commit

Permalink
fix(autofix): Log exceptions in repo client to get stacktrace (#1375)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennmueng authored Nov 4, 2024
1 parent 7c01365 commit d6ec59b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/seer/automation/codebase/repo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def get_file_content(self, path: str, sha: str | None = None) -> str | None:

return contents.decoded_content.decode()
except Exception as e:
logger.error(f"Error getting file contents: {e}")
logger.exception(f"Error getting file contents: {e}")

return None

Expand Down Expand Up @@ -416,13 +416,14 @@ def create_branch_from_changes(
try:
self._commit_file_change(patch=patch, branch_ref=branch_ref.ref)
except Exception as e:
logger.error(f"Error committing file change: {e}")
logger.exception(f"Error committing file patch: {e}")

elif file_changes:
for change in file_changes:
try:
self._commit_file_change(change=change, branch_ref=branch_ref.ref)
except Exception as e:
logger.error(f"Error committing file change: {e}")
logger.exception(f"Error committing file change: {e}")

branch_ref.update()

Expand Down

0 comments on commit d6ec59b

Please sign in to comment.