Prechádzať zdrojové kódy

fix: adjust update profile notice error

GyDi 3 rokov pred
rodič
commit
a4fb2dfcf8
1 zmenil súbory, kde vykonal 4 pridanie a 1 odobranie
  1. 4 1
      src/components/profile/profile-item.tsx

+ 4 - 1
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 }));
     }