优化ai接口异常处理

This commit is contained in:
fofolee 2025-03-15 11:09:53 +08:00
parent 770fd469c7
commit 04b08be60b

View File

@ -325,6 +325,7 @@ async function chat(content, apiConfig, options = {}) {
});
if (!response.ok) {
processBar?.close();
throw new Error(`HTTP error! status: ${response.status}`);
}