mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-21 22:44:06 +01:00
🐛 内核接口返回非 200 状态码时报错提示用户 Fix https://github.com/siyuan-note/siyuan/issues/5881
This commit is contained in:
parent
97959de878
commit
dab8e2b84e
6 changed files with 21 additions and 21 deletions
|
|
@ -36,7 +36,7 @@ export const fetchPost = (url: string, data?: any, cb?: (response: IWebSocketDat
|
|||
}
|
||||
}).catch((e) => {
|
||||
console.warn("fetch post error", e);
|
||||
if (url === "/api/transactions" && e.message === "Failed to fetch") {
|
||||
if (url === "/api/transactions" && (e.message === "Failed to fetch" || e.message === "Unexpected end of JSON input")) {
|
||||
kernelError();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue