LoginGate: show an error if the user is inactive.

master
Tom Hacohen 5 years ago
parent ed4ed86880
commit 0ce83defcc

@ -31,11 +31,13 @@ function EncryptionPart(props: { credentials: CredentialsDataRemote }) {
const credentials = props.credentials;
React.useEffect(() => {
// FIXME: verify the error is a 404
store.dispatch<any>(fetchUserInfo(credentials, credentials.credentials.email)).then((fetchedUserInfo: Action<EteSync.UserInfo>) => {
setUserInfo(fetchedUserInfo.payload);
}).catch(() => {
}).catch((e: Error) => {
// Do nothing.
if ((e instanceof EteSync.HTTPError) && (e.status !== 404)) {
setError(e);
}
}).finally(() => {
setFetched(true);
});

Loading…
Cancel
Save