#389: improve error handling in AccountSwitcher

This commit is contained in:
SleepWalker 2018-02-17 21:55:47 +02:00
parent 6135fea66c
commit f64fb3b96b

View File

@ -139,8 +139,11 @@ export class AccountSwitcher extends Component {
loader.show();
this.props.switchAccount(account)
.then(() => this.props.onAfterAction())
.finally(() => this.props.onAfterAction())
.then(() => this.props.onSwitch(account))
// we won't sent any logs to sentry, because an error should be already
// handled by external logic
.catch((error) => console.warn('Error switching account', { error }))
.finally(() => loader.hide());
};