BruceFletcher / node-red-contrib-postgres-multi

Multi-query variant of node-red-contrib-postgres
Apache License 2.0
5 stars 11 forks source link

[DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated #5

Open elmicha opened 5 years ago

elmicha commented 5 years ago

Hi,

thanks for your great node! I just tried it and at first I sent only one query in an object, instead of an array of objects. I fixed that immediately, but in the log file I found this scary deprecation warning:

Mär 12 21:39:39 rpi Node-RED[21990]: 12 Mar 21:39:39 - [error] [postgres:26057d45.591592] Error: msg.payload must be an array of queries
...
Mär 12 21:39:39 rpi Node-RED[21990]: (node:21990) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I don't know what "Unhandled promise rejections" are, but I guess it wouldn't be nice if Node-RED would be killed because of a simple user error.

BruceFletcher commented 5 years ago

Good point. I should be able to replicate that and then fix it, but I'm a bit busy at the moment so I'll have to put it on the ol' "to do" list for now.

Thanks for pointing it out, though!