mranney/node_redis — pull request #482 by mathieumg (2013-08-30 17:21:04+00:00)
Title: 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.

I doubt this is related to #374, but I'll mention it just to avoid confusion.

Basically, the JavaScript parser returns errors as strings whereas the hiredis parser returns errors as Error objects. It means this piece of code used to wrap the reply Error object in a new Error object before returning it. The consequence of this is that the innermost Error object's .toString() got called to serve as the outermost Error object's error message. Error.toString() returns "Error: " + Error.message. Hence, if you were to use hiredis you would be stuck with "Error: " at the beginning of all your errors in your client, even in .message.