Dan Janosik
6 years ago
No known key found for this signature in database
GPG Key ID: C6F8CE9FFDB2CED2
1 changed files with
13 additions and
0 deletions
-
app.js
|
|
@ -76,6 +76,19 @@ app.use(express.static(path.join(__dirname, 'public'))); |
|
|
|
|
|
|
|
process.on("unhandledRejection", (reason, p) => { |
|
|
|
console.log("Unhandled Rejection at: Promise", p, "reason:", reason, "stack:", reason.stack); |
|
|
|
|
|
|
|
if (global.influxdb) { |
|
|
|
var points = []; |
|
|
|
points.push({ |
|
|
|
measurement:`express.unhandled_rejection`, |
|
|
|
tags:{app:("btc-rpc-explorer." + global.config.coin)}, |
|
|
|
fields:{count:1} |
|
|
|
}); |
|
|
|
|
|
|
|
global.influxdb.writePoints(points).catch(err => { |
|
|
|
console.error(`Error saving data to InfluxDB: ${err.stack}`); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|