diff --git a/src/LoginGate.tsx b/src/LoginGate.tsx index dec5a65..03f6cc5 100644 --- a/src/LoginGate.tsx +++ b/src/LoginGate.tsx @@ -22,8 +22,9 @@ function EncryptionPart(props: { credentials: CredentialsType, onEncryptionFormS const credentials = props.credentials.value!; React.useEffect(() => { - store.dispatch(fetchUserInfo(credentials, credentials.credentials.email)).then((userInfo: any) => { - setIsNewUser(userInfo.error); + // FIXME: verify the error is a 404 + store.dispatch(fetchUserInfo(credentials, credentials.credentials.email)).catch(() => { + setIsNewUser(true); }).finally(() => { setFetched(true); });