mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-27 23:40:28 +05:30
#389: improve error handling in AccountSwitcher
This commit is contained in:
parent
6135fea66c
commit
f64fb3b96b
@ -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());
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user