Add else handlers with logging in toggleVerified catch handler
FREEBIE
This commit is contained in:
parent
8112cd220a
commit
697079cf9b
1 changed files with 6 additions and 0 deletions
|
@ -74,6 +74,8 @@
|
||||||
if (result instanceof Error) {
|
if (result instanceof Error) {
|
||||||
if (result.name === 'OutgoingIdentityKeyError') {
|
if (result.name === 'OutgoingIdentityKeyError') {
|
||||||
this.onSafetyNumberChanged();
|
this.onSafetyNumberChanged();
|
||||||
|
} else {
|
||||||
|
console.log('failed to toggle verified:', result.stack);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var keyError = _.some(result.errors, function(error) {
|
var keyError = _.some(result.errors, function(error) {
|
||||||
|
@ -81,6 +83,10 @@
|
||||||
});
|
});
|
||||||
if (keyError) {
|
if (keyError) {
|
||||||
this.onSafetyNumberChanged();
|
this.onSafetyNumberChanged();
|
||||||
|
} else {
|
||||||
|
_.forEach(result.errors, function(error) {
|
||||||
|
console.log('failed to toggle verified:', error.stack);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.bind(this)).then(function() {
|
}.bind(this)).then(function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue