fix(ai): actually throw probe error out of probeDevServerReadiness so AI captures the failure synchronously

This commit is contained in:
2026-05-16 13:16:17 -07:00
parent 1545145292
commit 9b5702a81c

View File

@@ -767,6 +767,7 @@ export async function probeDevServerReadiness(
`UPDATE fs_dev_servers SET state = 'failed' WHERE id = $1 AND project_id = $2 AND state != 'stopped'`,
[serverId, projectId],
);
throw new Error(`Probe failed with exit code ${r.exitCode}: ${r.stdout}`);
}
} catch (err) {
console.error(
@@ -782,6 +783,7 @@ export async function probeDevServerReadiness(
`UPDATE fs_dev_servers SET state = 'failed' WHERE id = $1 AND project_id = $2 AND state != 'stopped'`,
[serverId, projectId],
);
throw err;
}
}