mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-08 23:06:03 +00:00
feat: add error handling and alert display for model testing in EmbeddingForm and LLMForm
This commit is contained in:
@@ -93,7 +93,9 @@ export abstract class BaseHttpClient {
|
||||
// 统一错误处理
|
||||
if (error.response) {
|
||||
const { status, data } = error.response;
|
||||
const errMessage = data?.message || error.message;
|
||||
// Backend uses 'msg' field, also check 'message' for compatibility
|
||||
const errMessage =
|
||||
(data as { msg?: string })?.msg || data?.message || error.message;
|
||||
|
||||
switch (status) {
|
||||
case 401:
|
||||
|
||||
Reference in New Issue
Block a user