From a4fb2dfcf825bade055e71dc9e480dba948ffdf9 Mon Sep 17 00:00:00 2001
From: GyDi <segydi@foxmail.com>
Date: Wed, 15 Jun 2022 02:42:04 +0800
Subject: [PATCH] fix: adjust update profile notice error

---
 src/components/profile/profile-item.tsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/components/profile/profile-item.tsx b/src/components/profile/profile-item.tsx
index 32c8554..ca2f0df 100644
--- a/src/components/profile/profile-item.tsx
+++ b/src/components/profile/profile-item.tsx
@@ -137,7 +137,10 @@ const ProfileItem = (props: Props) => {
       await updateProfile(itemData.uid, { with_proxy: withProxy });
       mutate("getProfiles");
     } catch (err: any) {
-      Notice.error(err?.message || err.toString());
+      const errmsg = err?.message || err.toString();
+      Notice.error(
+        errmsg.replace(/error sending request for url (\S+?): /, "")
+      );
     } finally {
       setLoadingCache((cache) => ({ ...cache, [itemData.uid]: false }));
     }
-- 
GitLab