Catch and save Bad Mac errors on the incoming message model
This commit is contained in:
parent
40b54185f3
commit
0292c12712
1 changed files with 5 additions and 0 deletions
|
@ -96,7 +96,12 @@
|
|||
message.save({ errors : [e] }).then(function() {
|
||||
extension.trigger('message', message); // notify frontend listeners
|
||||
});
|
||||
} else if (e.message === 'Bad MAC') {
|
||||
message.save({ errors : [ _.pick(e, ['name', 'message'])]}).then(function() {
|
||||
extension.trigger('message', message); // notify frontend listeners
|
||||
});
|
||||
} else {
|
||||
console.log(e);
|
||||
throw e;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue