fix(confidence-engine): expose failed provider path
This commit is contained in:
@@ -566,6 +566,23 @@ describe("lib/graph/orchestrator startCase", () => {
|
||||
expect(result.rawResponse).toHaveLength(2501);
|
||||
});
|
||||
|
||||
it("preserves an attempted provider API path on analysis failure", async () => {
|
||||
mockAnalyseScenario.mockResolvedValue({
|
||||
success: false,
|
||||
error: "Provider failed",
|
||||
providerApiPath: "/api/chat",
|
||||
});
|
||||
const { startCase } = await import("@/lib/graph/orchestrator.js");
|
||||
|
||||
const result = await startCase({ scenario: "Scenario text" });
|
||||
|
||||
expect(result).toMatchObject({
|
||||
success: false,
|
||||
statusCode: 502,
|
||||
providerApiPath: "/api/chat",
|
||||
});
|
||||
});
|
||||
|
||||
it("returns null selectedQuestion when neither analysis nor graph path yields a question", async () => {
|
||||
mockAnalyseScenario.mockResolvedValue(
|
||||
makeAnalysisResult({
|
||||
|
||||
Reference in New Issue
Block a user