hotfix for plugin runtime

This commit is contained in:
lloydzhou
2024-10-01 12:55:57 +08:00
parent 953114041b
commit 9c577ad9d5
2 changed files with 10 additions and 4 deletions

View File

@@ -222,7 +222,10 @@ export function stream(
),
)
.then((res) => {
const content = JSON.stringify(res.data);
let content = res.data;
try {
content = JSON.stringify(res.data);
} catch (e) {}
if (res.status >= 300) {
return Promise.reject(content);
}