diff --git a/app/soapbox/actions/auth.ts b/app/soapbox/actions/auth.ts index e6ab20e9b..e21974116 100644 --- a/app/soapbox/actions/auth.ts +++ b/app/soapbox/actions/auth.ts @@ -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; } }); }; diff --git a/app/soapbox/features/verification/__tests__/registration.test.tsx b/app/soapbox/features/verification/__tests__/registration.test.tsx index f82c0dab4..fbde2fce3 100644 --- a/app/soapbox/features/verification/__tests__/registration.test.tsx +++ b/app/soapbox/features/verification/__tests__/registration.test.tsx @@ -18,7 +18,7 @@ describe('', () => { 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, {}); }); });