feat: add error handling and alert display for model testing in EmbeddingForm and LLMForm

This commit is contained in:
Junyan Qin
2025-12-24 16:12:41 +08:00
parent a9a262eaae
commit 10ee30695a
3 changed files with 35 additions and 5 deletions

View File

@@ -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: