mirror of https://github.com/garrytan/gstack.git
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:
parent
029a7c2a37
commit
336dbaa50d
|
|
@ -277,7 +277,10 @@ export async function runSkillTest(options: {
|
||||||
|
|
||||||
// Use resultLine for structured result data
|
// Use resultLine for structured result data
|
||||||
if (resultLine) {
|
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';
|
exitReason = 'success';
|
||||||
} else if (resultLine.subtype) {
|
} else if (resultLine.subtype) {
|
||||||
exitReason = resultLine.subtype;
|
exitReason = resultLine.subtype;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue