mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 04:44:33 +00:00
fix: suppress raw API error payloads (#924) (thanks @grp06)
Co-authored-by: George Pickett <gpickett00@gmail.com>
This commit is contained in:
@@ -33,4 +33,10 @@ describe("formatAssistantErrorText", () => {
|
||||
"The AI service is temporarily overloaded. Please try again in a moment.",
|
||||
);
|
||||
});
|
||||
it("suppresses raw error JSON payloads that are not otherwise classified", () => {
|
||||
const msg = makeAssistantError(
|
||||
'{"type":"error","error":{"message":"Something exploded","type":"server_error"}}',
|
||||
);
|
||||
expect(formatAssistantErrorText(msg)).toBe("The AI service returned an error. Please try again.");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user