fix(confidence-engine): sanitize focused reasoning outage
This commit is contained in:
@@ -144,9 +144,15 @@ async function post(request) {
|
||||
});
|
||||
console.info("[api/focused-investigation/deconstruct] end", {
|
||||
targetNodeId,
|
||||
status: 500,
|
||||
status: e?.code === "PROVIDER_UNAVAILABLE" ? 503 : 500,
|
||||
elapsedMs,
|
||||
});
|
||||
if (e?.code === "PROVIDER_UNAVAILABLE") {
|
||||
return Response.json(
|
||||
{ error: "Reasoning service is temporarily unavailable." },
|
||||
{ status: 503 },
|
||||
);
|
||||
}
|
||||
return Response.json(
|
||||
{ error: e.message || "Unknown server error" },
|
||||
{ status: 500 },
|
||||
|
||||
Reference in New Issue
Block a user