fix: capture and display ai-reviewer.sh error messages in workflow#18
Merged
LearningCircuit merged 2 commits intomainfrom Nov 13, 2025
Merged
fix: capture and display ai-reviewer.sh error messages in workflow#18LearningCircuit merged 2 commits intomainfrom
LearningCircuit merged 2 commits intomainfrom
Conversation
Previously, when ai-reviewer.sh failed with exit code 1, the workflow would immediately stop due to shell errexit (-e flag) without displaying the actual error message. This made debugging failures very difficult. Changes: - Temporarily disable errexit with 'set +e' before running ai-reviewer.sh - Capture both stdout and stderr with '2>&1' redirection - Store the exit code separately for inspection - Re-enable errexit with 'set -e' after capture - Check exit code and display full error output if non-zero - Include exit code in debug output for better troubleshooting This fix ensures that when the AI reviewer fails, users will see the actual error message (e.g., "Missing OPENROUTER_API_KEY", "Diff too large", "API call failed") instead of just "Error: Process completed with exit code 1".
|
AI response could not be processed. Please check the workflow logs for debugging information. |
The workflow's stderr capture (2>&1) was picking up progress messages from ai-reviewer.sh, contaminating the JSON response. Now these messages only appear in debug mode, keeping stdout clean for JSON parsing.
AI Code ReviewThis PR effectively fixes error handling and debugging output contamination issues in the AI reviewer workflow. 🔒 Security
Code Quality & Best Practices✅ Strengths:
Performance
Testing Considerations
Review by Friendly AI Reviewer - made with ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Changes
Test plan
Related