Merge pull request #5621 from ConnectAI-E/hotfix/plugin-result

hotfix plugin result is not string #5614
This commit is contained in:
Lloyd Zhou
2024-10-10 12:48:55 +08:00
committed by GitHub

View File

@@ -223,6 +223,11 @@ export function stream(
)
.then((res) => {
let content = res.data || res?.statusText;
// hotfix #5614
content =
typeof content === "string"
? content
: JSON.stringify(content);
if (res.status >= 300) {
return Promise.reject(content);
}