fix: preserve acceptance scenario failure detail in the P2 report
This commit is contained in:
@@ -1015,8 +1015,9 @@ async function executeChecksLocal({ checks, failAt } = {}) {
|
||||
const output = await scenario.run();
|
||||
if (scenario.id === failAt) throw new Error("injected acceptance failure");
|
||||
result = { id: scenario.id, status: "PASS", startedAt, finishedAt: nowIso(), commands: output.commands ?? [], artifacts: output.artifacts ?? [] };
|
||||
} catch {
|
||||
result = { id: scenario.id, status: "FAIL", startedAt, finishedAt: nowIso(), commands: [], artifacts: [], error: "Acceptance scenario failed safely." };
|
||||
} catch (error) {
|
||||
const detail = error instanceof Error ? error.message : String(error);
|
||||
result = { id: scenario.id, status: "FAIL", startedAt, finishedAt: nowIso(), commands: [], artifacts: [], error: `Acceptance scenario failed safely: ${detail}` };
|
||||
stopped = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user