diff --git a/app/gabsocial/actions/auth.js b/app/gabsocial/actions/auth.js index 6d80e337a..4d2b61d69 100644 --- a/app/gabsocial/actions/auth.js +++ b/app/gabsocial/actions/auth.js @@ -129,6 +129,7 @@ export function register(params) { return dispatch(fetchMe()); }).catch(error => { dispatch({ type: AUTH_REGISTER_FAIL, error }); + throw error; }); }; } diff --git a/app/gabsocial/features/landing_page/components/registration_form.js b/app/gabsocial/features/landing_page/components/registration_form.js index c2f420c25..5acd1462c 100644 --- a/app/gabsocial/features/landing_page/components/registration_form.js +++ b/app/gabsocial/features/landing_page/components/registration_form.js @@ -44,7 +44,9 @@ class RegistrationForm extends ImmutablePureComponent { onSubmit = e => { this.setState({ submissionLoading: true }); - this.props.dispatch(register(this.state.params.toJS())); + this.props.dispatch(register(this.state.params.toJS())).catch(error => { + this.setState({ submissionLoading: false }); + }); } onFetchCaptcha = captcha => {