fix: 在API错误信息中包含响应体内容

This commit is contained in:
2026-01-08 23:33:56 +08:00
parent d77179a39d
commit a07000ed44

View File

@@ -58,7 +58,7 @@ async function fetchApi(token, query) {
});
if (statusCode !== 200) {
throw new Error(`API Status Code: ${statusCode}`);
throw new Error(`API Status Code: ${statusCode}, ${await body.text()}`);
}
const data = await body.json();