diff --git a/src/components/proxy/ProxyPanel.tsx b/src/components/proxy/ProxyPanel.tsx index a736c6b8c..c227a1230 100644 --- a/src/components/proxy/ProxyPanel.tsx +++ b/src/components/proxy/ProxyPanel.tsx @@ -29,6 +29,7 @@ import { import type { ProxyStatus } from "@/types/proxy"; import { useTranslation } from "react-i18next"; import { AnimatePresence, motion } from "framer-motion"; +import { extractErrorMessage } from "@/utils/errorUtils"; interface ProxyPanelProps { enableLocalProxy: boolean; @@ -88,8 +89,12 @@ export function ProxyPanel({ { closeButton: true }, ); } catch (error) { + const detail = + extractErrorMessage(error) || + t("common.unknown", { defaultValue: "未知错误" }); toast.error( t("proxy.takeover.failed", { + detail, defaultValue: "切换接管状态失败", }), );