jpodwys / cache-service-redis

A redis plugin for cache-service.
MIT License
7 stars 9 forks source link

mget is using result.length before checking for an error #22

Open gechols opened 4 years ago

gechols commented 4 years ago

We have a case where we are running out of connections and the line: https://github.com/jpodwys/cache-service-redis/blob/master/redisCacheModule.js#L176 throws an exception that hides the actual error. This throws an exception when result.length is used before checking to see if err is set or response is not set. You have code elsewhere that checks for if (!err && response) This would help solve this problem.

jpodwys commented 4 years ago

Thank you for reporting this issue! I'd be happy to accept a pull request to address the issue.