diff --git a/server/commons/queue.coffee b/server/commons/queue.coffee index a168f87c6..64b71ae64 100644 --- a/server/commons/queue.coffee +++ b/server/commons/queue.coffee @@ -201,7 +201,7 @@ class MongoQueue extends events.EventEmitter receiptHandle: @_generateRandomReceiptHandle() scheduledVisibilityTime: @_constructDefaultVisibilityTimeoutDate() - @Message.findOneAndUpdate conditions, update, options, (err, data) => + @Message.findOneAndUpdate conditions, update, (err, data) => return @emit 'error',err,data if err? originalData = data