mblackstock / node-red-contrib-influxdb

Node-RED nodes to save and query data from an influxdb time series database
Other
64 stars 46 forks source link

Status on successful operation? #51

Closed picsil closed 4 years ago

picsil commented 4 years ago

I am able to use the catch node to trap errors on a DB write, but how do I react to a successful operation? This node doesn't appear to set a status on success, and the write has no output. So for example, I have a flow that accepts an HTTP POST, formats the data, and writes it to InfluxDB. I can catch an error and send an appropriate HTTP response (4xx, 5xx, etc). But since I can't seem to trap a successful operation, I have no way to send a 200 OK response from my flow, other than to just trust that the operation succeeded. Maybe I'm missing something obvious?

mblackstock commented 4 years ago

see #48 for discussion on whether we should provide output for write and batch nodes. You have it right. If you don't get an exception, you can assume it's written successfully.