Comparing version 1.31.15 to 1.31.16
@@ -450,3 +450,3 @@ /* | ||
var req = request.post(options[xi], function (err, res, body) { | ||
if ((!err) && (res && res.statusCode < 300)) { | ||
if ((!err) && (res && (res.statusCode < 300 || (res.statusCode >= 400 && res.statusCode < 500)))) { | ||
// remove from NeDB | ||
@@ -537,3 +537,5 @@ db.remove({_id: {$in: dpIds}}, {multi: true}, function (err, numRemoved) { | ||
var msg = '' | ||
if (err || (res && res.statusCode > 299)) { | ||
if ((res && res.statusCode > 499) || err) { | ||
// err could be DNS problem or TCP timeout | ||
// Status code 400 might be caused by deactivated tokens -> no retry | ||
msg = util.format('HTTP Error: %d send failed for %d data points to %s, %s', (res ? res.statusCode : -1), dpCount, url, body || err) | ||
@@ -540,0 +542,0 @@ if (!err) { |
{ | ||
"name": "spm-agent", | ||
"version": "1.31.15", | ||
"version": "1.31.16", | ||
"description": "Node.js agent framework for SPM by Sematext", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59214
1106