Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
if (ciVals && ciVals instanceof Object) {
if (ciVals.hasOwnProperty('host') && ciVals.hasOwnProperty('port') && ciVals.hasOwnProperty('database')) {
install.ciVals = ciVals;
next();
} else {
winston.error('Required values are missing for automated CI integration:');
if (!ciVals.hasOwnProperty('host')) {
winston.error(' host');
}
if (!ciVals.hasOwnProperty('port')) {
winston.error(' port');
}
if (!ciVals.hasOwnProperty('database')) {
winston.error(' database');
}
process.exit();
}
} else {
next();
}
}
function analysisFailureHandler(error, value) {
winston.error("Analysis of revision " + value.revisionID +
", diff " + value.diffID + " failed: " + error);
conduitInstance.differentialCreateComment(
value.revisionID, "Shipshape analysis failed: " + error, "comment",
false, true, function(error) {
if (error !== undefined) {
winston.error("unable to report error message as comment to " +
"Phabricator in analysis failure handler: " + error);
}
conduitInstance.harbormasterSendMessage(value.PHID, "fail",
function(error) {
if (error !== undefined) {
winston.error("unable to report error build status to " +
" Phabricator in analysis failure handler: " + error);
}
});
.catch(err => {
winston.error('Could not GET /teams?member=%s: %d %s', req.params.userId, err.status || 0, err.message);
return res.status(err.status || 0).send(err);
});
}
this.consumer.on('error', (error) => {
winston.error('Tweet Kafka Consumer - error > ', error);
});
this.consumer.on('message', (message: any) => {
db.on('error', function (err) {
winston.error(err.stack);
});
let projectRootPath = "";
try {
projectRootPath = name ?
path.resolve(process.cwd(), name) : process.cwd();
} catch (error) {
winston.error(error);
throw new Error("Could not determine route");
}
let outputPath = ".funcpack";
try {
if (options.output) {
outputPath = path.join(options.output, outputPath);
}
} catch (e) {
winston.error(e);
throw new Error("Could not parse the output option");
}
winston.info("Unpacking project at: " + projectRootPath);
await Unpacker.unpack({ projectRootPath, outputPath });
winston.info("Complete!");
}
async function main () {
while (1) {
try {
await run()
} catch (e) {
logger.error(e)
}
}
}
cdnDao.del(req.params.id, function (err) {
if (!err) {
res.writeHead(204);
res.end();
} else {
res.writeHead(err.status_code || 500, { 'Content-Type': 'text/plain'});
res.end('Error deleting cdn');
logger.error('Error while deleting cdn', err);
}
});
});