You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
When handling the "error reply" event from the parser, we now bubble up the Error object if it's one instead of wrapping it in another Error.
This commit is contained in:
committed by
Bryce Baril
parent
d5c7a2ce2e
commit
75cf487d73
6
index.js
6
index.js
@@ -302,7 +302,11 @@ RedisClient.prototype.init_parser = function () {
|
||||
|
||||
// "reply error" is an error sent back by Redis
|
||||
this.reply_parser.on("reply error", function (reply) {
|
||||
self.return_error(new Error(reply));
|
||||
if (reply instanceof Error) {
|
||||
self.return_error(reply);
|
||||
} else {
|
||||
self.return_error(new Error(reply));
|
||||
}
|
||||
});
|
||||
this.reply_parser.on("reply", function (reply) {
|
||||
self.return_reply(reply);
|
||||
|
Reference in New Issue
Block a user