node-red-contrib-influxdb
Advanced tools
Comparing version 0.3.1 to 0.4.0
@@ -138,2 +138,5 @@ var _ = require('lodash'); | ||
client.writePoints(points, writeOptions).catch(function(err) { | ||
msg.influx_error = { | ||
statusCode : err.res ? err.res.statusCode : 503 | ||
} | ||
node.error(err,msg); | ||
@@ -189,2 +192,5 @@ }); | ||
client.writePoints(msg.payload, writeOptions).catch(function(err) { | ||
msg.influx_error = { | ||
statusCode : err.res ? err.res.statusCode : 503 | ||
} | ||
node.error(err,msg); | ||
@@ -260,3 +266,6 @@ }); | ||
}).catch(function (err) { | ||
node.error(err); | ||
msg.influx_error = { | ||
statusCode : err.res ? err.res.statusCode : 503 | ||
} | ||
node.error(err, msg); | ||
}); | ||
@@ -263,0 +272,0 @@ }); |
{ | ||
"name": "node-red-contrib-influxdb", | ||
"version": "0.3.1", | ||
"version": "0.4.0", | ||
"description": "Node-RED nodes to save and query data from an influxdb time series database", | ||
@@ -5,0 +5,0 @@ "main": "influxdb.js", |
@@ -165,1 +165,9 @@ node-red-contrib-influxdb | ||
return msg; | ||
### Catching Failed Reads and Writes | ||
Errors in reads and writes can be caught using the node-red `catch` node as usual. | ||
Standard error information is availlable in the default `msg.error` field; additional | ||
information about the underlying error is in the `msg.influx_error` field. Currently, | ||
this includes the HTTP status code returned from the influxdb server. The `influx-read` | ||
node will always throw a `503`, whereas the write nodes will include other status codes as detailed in the [Influx API documentation](https://docs.influxdata.com/influxdb/v1.7/tools/api/#status-codes-and-responses-2). |
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
76074
15
544
173
2