Handle single-error rejections when sending messages
We can not assume that we will get back an error array. Closes #258 // FREEBIE
This commit is contained in:
parent
6e1a41e9cf
commit
363c436b33
1 changed files with 3 additions and 0 deletions
|
@ -100,6 +100,9 @@
|
|||
message.unset('pending');
|
||||
message.save();
|
||||
}.bind(this)).catch(function(errors) {
|
||||
if (errors instanceof Error) {
|
||||
errors = [errors];
|
||||
}
|
||||
var keyErrors = [];
|
||||
_.each(errors, function(e) {
|
||||
if (e.error.name === 'OutgoingIdentityKeyError') {
|
||||
|
|
Loading…
Reference in a new issue