Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes it's not very shinning there. I would also throw the error instead of printing the error to the console and returning undefined.


You are in a callback there. Goodbye your error!


Oh right. I once made a layer on top of the redis client to use promises because callbacks are a pain to deal with.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: