fix(confidence-engine): propagate start outage classification
This commit is contained in:
+3
-1
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user