fix: log TorngitClientError details for PR comment and commit status failures #643
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds
error_codeanderror_messageto log.error() calls whenTorngitClientErroris caught during:Problem
When these operations fail, we log an error but don't include the actual error details. This makes it impossible to diagnose whether failures are due to:
Solution
Capture the exception and log its details:
Impact
After this is deployed, we can check Sentry logs to determine what's actually causing failures for specific customers (e.g., SquareUp).
Note
Improves diagnostics for provider failures by enriching error logs with exception details.
helpers/notifier.pyand bundle analysiscomment.py, catchTorngitClientError as ewhen creating/updating PR comments and logerror_codeanderror_messageinlog.errorextrascommit_status.py, add the same error details when setting commit status failsNo behavior change beyond expanded logging metadata.
Written by Cursor Bugbot for commit d840423. This will update automatically on new commits. Configure here.