1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Add .command_used to errors thrown by the parser

This commit is contained in:
Ruben Bridgewater
2015-09-14 00:15:33 +02:00
parent e4bd9bf0c5
commit 1a06cfb6ec
3 changed files with 5 additions and 2 deletions

View File

@@ -509,6 +509,7 @@ RedisClient.prototype.on_data = function (data) {
RedisClient.prototype.return_error = function (err) {
var command_obj = this.command_queue.shift(), queue_len = this.command_queue.length;
err.command_used = command_obj.command.toUpperCase();
if (this.pub_sub_mode === false && queue_len === 0) {
this.command_queue = new Queue();