diff --git a/src/frontend/src/components/forms/AuthenticationForm.tsx b/src/frontend/src/components/forms/AuthenticationForm.tsx index 66057b5ae363..5ae0e5f0dbcd 100644 --- a/src/frontend/src/components/forms/AuthenticationForm.tsx +++ b/src/frontend/src/components/forms/AuthenticationForm.tsx @@ -202,7 +202,7 @@ export function RegistrationForm() { } }) .catch((err) => { - if (err.response.status === 400) { + if (err.response?.status === 400) { setIsRegistering(false); for (const [key, value] of Object.entries(err.response.data)) { registrationForm.setFieldError(key, value as string); diff --git a/src/frontend/src/components/settings/SettingList.tsx b/src/frontend/src/components/settings/SettingList.tsx index bec4f1097f9c..4ae79ed6316b 100644 --- a/src/frontend/src/components/settings/SettingList.tsx +++ b/src/frontend/src/components/settings/SettingList.tsx @@ -158,7 +158,7 @@ export function SettingList({ ); })} - {(keys || allKeys).length === 0 && ( + {(keys || allKeys)?.length === 0 && ( No settings specified diff --git a/src/frontend/src/pages/Auth/Set-Password.tsx b/src/frontend/src/pages/Auth/Set-Password.tsx index 88f9870031c1..31f0b4aa1952 100644 --- a/src/frontend/src/pages/Auth/Set-Password.tsx +++ b/src/frontend/src/pages/Auth/Set-Password.tsx @@ -77,8 +77,8 @@ export default function Set_Password() { }) .catch((err) => { if ( - err.response.status === 400 && - err.response.data?.token == 'Invalid value' + err.response?.status === 400 && + err.response?.data?.token == 'Invalid value' ) { invalidToken(); } else {