fix(confidence-engine): propagate start outage classification

This commit is contained in:
2026-09-09 19:36:29 +01:00
parent 707fe1b3c0
commit 60c90bdd6a
3 changed files with 28 additions and 10 deletions
+3 -1
View File
@@ -100,6 +100,7 @@ export async function analyseScenario(scenario, opts = {}) {
"500",
e.providerApiPath,
e.providerExecution,
e.code,
);
}
@@ -175,7 +176,7 @@ function tryValidateAgainstSchema(data, schema) {
// ── Result builders ──────────────────────────────────
function buildErrorResponse(message, elapsed, statusCode = 500, providerApiPath, providerExecution) {
function buildErrorResponse(message, elapsed, statusCode = 500, providerApiPath, providerExecution, code) {
return {
success: false,
error: message,
@@ -187,6 +188,7 @@ function buildErrorResponse(message, elapsed, statusCode = 500, providerApiPath,
statusCode,
providerApiPath,
providerExecution,
code,
};
}
+1
View File
@@ -382,6 +382,7 @@ export async function startCase(body, dependencies = {}) {
providerApiPath: analysis.providerApiPath ?? undefined,
providerExecution: analysis.providerExecution ?? undefined,
rawResponse: analysis.rawResponse ?? undefined,
code: analysis.code ?? undefined,
statusCode: Number(analysis.statusCode) || 502,
};
}