浏览代码

Hotfix register logs (#2920)

* install github app button

* general error component

* auto-generate cluster name

* fix button text color

* infra tab for porter user

* log register error

* log block
jusrhee 3 年之前
父节点
当前提交
07c753d986
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      dashboard/src/main/auth/Register.tsx

+ 6 - 1
dashboard/src/main/auth/Register.tsx

@@ -96,7 +96,12 @@ const Register: React.FC<Props> = ({
             authenticate();
           }
         })
-        .catch((err) => setCurrentError(err.response.data.error));
+        .catch((err) => {
+          console.log("registration:", err);
+          if (err.response?.data?.error) {
+            setCurrentError(err.response.data.error)
+          }
+        });
     }
   };