diff --git a/js/libtextsecure.js b/js/libtextsecure.js index addc3e401d8..b79916e30b3 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -39305,7 +39305,7 @@ MessageReceiver.prototype = { ev.error = error; ev.proto = envelope; this.dispatchEvent(ev); - throw error; // reject this promise + return Promise.reject(error); }.bind(this)); }, handleSentMessage: function(destination, timestamp, message) { diff --git a/libtextsecure/message_receiver.js b/libtextsecure/message_receiver.js index 169c616996b..67bfdc04edf 100644 --- a/libtextsecure/message_receiver.js +++ b/libtextsecure/message_receiver.js @@ -111,7 +111,7 @@ MessageReceiver.prototype = { ev.error = error; ev.proto = envelope; this.dispatchEvent(ev); - throw error; // reject this promise + return Promise.reject(error); }.bind(this)); }, handleSentMessage: function(destination, timestamp, message) {