Merge branch 'login-fail-throw' into 'develop'

logIn: rethrow 403 for non-waitlisted account

See merge request soapbox-pub/soapbox-fe!1617
environments/review-develop-3zknud/deployments/504
Alex Gleason 2022-07-08 20:16:50 +00:00
commit 79b11fefde
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -180,8 +180,8 @@ export const verifyCredentials = (token: string, accountUrl?: string) => {
return account;
} else {
if (getState().me === null) dispatch(fetchMeFail(error));
dispatch({ type: VERIFY_CREDENTIALS_FAIL, token, error, skipAlert: true });
return error;
dispatch({ type: VERIFY_CREDENTIALS_FAIL, token, error });
throw error;
}
});
};

Wyświetl plik

@ -18,7 +18,7 @@ describe('<Registration />', () => {
mock.onPost('/api/v1/pepe/accounts').reply(200, {});
mock.onPost('/api/v1/apps').reply(200, {});
mock.onPost('/oauth/token').reply(200, {});
mock.onPost('/api/v1/accounts/verify_credentials').reply(200, {});
mock.onGet('/api/v1/accounts/verify_credentials').reply(200, { id: '123' });
mock.onGet('/api/v1/instance').reply(200, {});
});
});