This commit is contained in:
2026-08-12 12:35:32 +08:00
parent 11e085e30f
commit 4fb8b85c13
22 changed files with 161 additions and 47 deletions
+2 -1
View File
@@ -134,7 +134,8 @@ export function getApiErrorDetails(error: unknown, fallback = '接口请求失
traceId: response?.traceId || undefined,
}
}
return { message: error instanceof Error ? error.message : fallback }
// Local/runtime errors are not user-facing API messages and may contain stack details.
return { message: fallback }
}
export function getApiErrorMessage(error: unknown, fallback = '接口请求失败'): string {