Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
debugs[set] = function() {
var msg = exports.format.apply(exports, arguments);
console.error('%s %d: %s', set, pid, msg);
};
} else {
function errorFunction (route, message) {
'use strict';
message += "\nThis error was triggered by the following route " + JSON.stringify(route);
console.error("%s", message);
return function (req, res, options, next) {
res.responseCode = exports.HTTP_SERVER_ERROR;
res.contentType = "text/plain";
res.body = message;
};
}