Tuesday, 4 April 2017

Make Node.js Redis client's .multi() and .batch() return errors in results for testing purposes

I can read in the docs from Node.js Redis client:

If your code contains an syntax error an EXECABORT error is going to be thrown and all commands are going to be aborted. That error contains a .errors property that contains the concret errors. If all commands were queued successfully and an error is thrown by redis while processing the commands that error is going to be returned in the result array! No other command is going to be aborted though than the onces failing.

How do I write a Node.js Redis client's .multi() and .batch() in order to have errors in results for testing purposes?



via Adriano Di Giovanni