Log outgoing errors individually
// FREEBIE
This commit is contained in:
parent
ada3d999e0
commit
d1191c509c
1 changed files with 1 additions and 1 deletions
|
@ -101,12 +101,12 @@
|
||||||
sendFunc(this.get('id'), body, attachments, now).then(function() {
|
sendFunc(this.get('id'), body, attachments, now).then(function() {
|
||||||
message.save({'sent': true});
|
message.save({'sent': true});
|
||||||
}.bind(this)).catch(function(errors) {
|
}.bind(this)).catch(function(errors) {
|
||||||
console.log(errors);
|
|
||||||
if (errors instanceof Error) {
|
if (errors instanceof Error) {
|
||||||
errors = [errors];
|
errors = [errors];
|
||||||
}
|
}
|
||||||
var keyErrors = [];
|
var keyErrors = [];
|
||||||
_.each(errors, function(e) {
|
_.each(errors, function(e) {
|
||||||
|
console.log(e);
|
||||||
if (e.error.name === 'OutgoingIdentityKeyError') {
|
if (e.error.name === 'OutgoingIdentityKeyError') {
|
||||||
keyErrors.push(e.error);
|
keyErrors.push(e.error);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue