fix: improve error handling in port settings save function #4707

This commit is contained in:
Tunglies
2025-11-04 07:17:14 +08:00
Unverified
parent 72d94c62f4
commit ebd7f457d2
2 changed files with 4 additions and 2 deletions

View File

@@ -87,6 +87,7 @@
- 在 macOS 10.15 及更高版本默认包含 Mihomo-go122以解决 Intel 架构 Mac 无法运行内核的问题
- Tun 模式不可用时,禁用系统托盘的 Tun 模式菜单
- 改进订阅更新方式,仍失败需打开订阅设置 `允许危险证书`
- 允许设置 Mihomo 端口范围 1000(含) - 65536(含)
</details>

View File

@@ -71,8 +71,9 @@ export const ClashPortViewer = forwardRef<ClashPortViewerRef>((_, ref) => {
setOpen(false);
showNotice("success", t("Port settings saved"));
},
onError: () => {
showNotice("error", t("Failed to save port settings"));
onError: (e) => {
showNotice("error", e.message || t("Failed to save port settings"));
// showNotice("error", t("Failed to save port settings"));
},
},
);