megastef / node-crate

Node.js base DB-Driver for CRATE (www.crate.io)
52 stars 18 forks source link

Not listening for request errors #21

Closed dieseldjango closed 7 years ago

dieseldjango commented 7 years ago

I happened to get into a state where requests to my Crate DB were causing parsing errors with http.request, and I discovered that this package is not listening for request errors. This should be added in _executeSql.

req.on('error', () => { reject(err); });
Igor-lkm commented 7 years ago

Hello @dieseldjango

Thank you for the information!

This commit should solve this issue: https://github.com/megastef/node-crate/commit/92d2b6ed7ffb98f19839efdb7d9145a64cf4cd53 Version 2.0.2 is available on npm