Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: Improve error handling in AI code reviewer workflow

LearningCircuitb241eb23ff7e
diff --git a/.github/workflows/ai-code-reviewer.yml b/.github/workflows/ai-code-reviewer.yml
index 80442fa8d4..ee26bfaee2 100644
--- a/.github/workflows/ai-code-reviewer.yml
+++ b/.github/workflows/ai-code-reviewer.yml
@@ -51,15 +51,30 @@ jobs:
run: |
# Run the AI reviewer and save response to file
echo "Running AI code review..."
- AI_RESPONSE=$(bash ai-reviewer.sh < diff.txt)
+
+ # Temporarily disable errexit to capture errors properly
+ set +e
+ AI_RESPONSE=$(bash ai-reviewer.sh < diff.txt 2>&1)
+ EXIT_CODE=$?
+ set -e
# Output raw response for debugging (only in debug mode)
if [ "$DEBUG_MODE" = "true" ]; then
echo "=== RAW AI RESPONSE FOR DEBUG ==="
+ echo "Exit code: $EXIT_CODE"
echo "$AI_RESPONSE"
echo "=== END RAW AI RESPONSE ==="
fi
+ # Check if the script failed
+ if [ $EXIT_CODE -ne 0 ]; then
+ echo "❌ AI reviewer script failed with exit code $EXIT_CODE"
+ echo ""
+ echo "Error output:"
+ echo "$AI_RESPONSE"
+ exit 1
+ fi
+
# Check if AI_RESPONSE is empty
if [ -z "$AI_RESPONSE" ]; then
echo "❌ AI response is empty"