You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Fix js parser sending non-Errors
This commit is contained in:
10
index.js
10
index.js
@@ -302,11 +302,7 @@ RedisClient.prototype.init_parser = function () {
|
||||
|
||||
// "reply error" is an error sent back by Redis
|
||||
this.reply_parser.on("reply error", function (reply) {
|
||||
if (reply instanceof Error) {
|
||||
self.return_error(reply);
|
||||
} else {
|
||||
self.return_error(new Error(reply));
|
||||
}
|
||||
self.return_error(reply);
|
||||
});
|
||||
this.reply_parser.on("reply", function (reply) {
|
||||
self.return_reply(reply);
|
||||
@@ -654,7 +650,9 @@ RedisClient.prototype.return_reply = function (reply) {
|
||||
}
|
||||
|
||||
try_callback(command_obj.callback, reply);
|
||||
} else debug("no callback for reply: " + (reply && reply.toString && reply.toString()));
|
||||
} else {
|
||||
debug("no callback for reply: " + (reply && reply.toString && reply.toString()));
|
||||
}
|
||||
} else if (this.pub_sub_mode || (command_obj && command_obj.sub_command)) {
|
||||
if (Array.isArray(reply)) {
|
||||
type = reply[0].toString();
|
||||
|
Reference in New Issue
Block a user