EmailVerification.duck uses storableError

This commit is contained in:
Vesa Luusua 2017-10-17 19:10:42 +03:00
parent 13df1c3abb
commit 171c86d6eb

View file

@ -1,3 +1,4 @@
import { storableError } from '../util/errors';
import { fetchCurrentUser } from './user.duck';
// ================ Action types ================ //
@ -64,5 +65,5 @@ export const verify = verificationToken => (dispatch, getState, sdk) => {
.verifyEmail({ verificationToken })
.then(() => dispatch(verificationSuccess()))
.then(() => dispatch(fetchCurrentUser()))
.catch(e => dispatch(verificationError(e)));
.catch(e => dispatch(verificationError(storableError(e))));
};