Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
req.on('end', function () {
collector.collect(mod_artedi.FMT_PROM, function (err, metrics) {
if (err) {
next(new VError(err));
return;
}
res.setHeader('Content-Type', 'text/plain; version=0.0.4');
res.send(metrics);
});
next();
});
req.resume();