mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-27 23:40:28 +05:30
#316: handle promise rejection in forgot password form
This commit is contained in:
parent
7a30a7e37f
commit
9881199d47
@ -1,3 +1,5 @@
|
||||
import logger from 'services/logger';
|
||||
|
||||
import AbstractState from './AbstractState';
|
||||
import LoginState from './LoginState';
|
||||
import CompleteState from './CompleteState';
|
||||
@ -14,7 +16,10 @@ export default class ForgotPasswordState extends AbstractState {
|
||||
|
||||
resolve(context, payload = {}) {
|
||||
context.run('forgotPassword', {login: payload.email || this.getLogin(context)})
|
||||
.then(() => context.setState(new RecoverPasswordState()));
|
||||
.then(() => context.setState(new RecoverPasswordState()))
|
||||
.catch((err = {}) =>
|
||||
err.errors || logger.warn('Error requesting password recoverage', err)
|
||||
);
|
||||
}
|
||||
|
||||
goBack(context) {
|
||||
|
Loading…
Reference in New Issue
Block a user