Feroze Mohideen 2 lat temu
rodzic
commit
ea4e95931e

+ 1 - 1
dashboard/src/components/ProvisionerSettings.tsx

@@ -368,7 +368,7 @@ const ProvisionerSettings: React.FC<Props> = (props) => {
       // }
       // }
       setErrorMessage(undefined);
       setErrorMessage(undefined);
     } catch (err) {
     } catch (err) {
-      const errMessage = err.response.data.error.replace("unknown: ", "");
+      const errMessage = err.response?.data?.error?.replace("unknown: ", "") ?? "";
       // hacky, need to standardize error contract with backend
       // hacky, need to standardize error contract with backend
       setIsClicked(false);
       setIsClicked(false);
       if (errMessage.includes("elastic IP")) {
       if (errMessage.includes("elastic IP")) {