mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-01 19:25:10 +02:00
fix: detect is_error from claude -p result line (ConnectionRefused was PASS)
claude -p can return subtype="success" with is_error=true when the API is unreachable. Previously we only checked subtype, so API failures silently passed. Now check is_error first and report as 'error_api'. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -277,7 +277,10 @@ export async function runSkillTest(options: {
|
||||
|
||||
// Use resultLine for structured result data
|
||||
if (resultLine) {
|
||||
if (resultLine.subtype === 'success') {
|
||||
if (resultLine.is_error) {
|
||||
// claude -p can return subtype=success with is_error=true (e.g. API connection failure)
|
||||
exitReason = 'error_api';
|
||||
} else if (resultLine.subtype === 'success') {
|
||||
exitReason = 'success';
|
||||
} else if (resultLine.subtype) {
|
||||
exitReason = resultLine.subtype;
|
||||
|
||||
Reference in New Issue
Block a user