Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
git.branch((branch) => {
let ravenConfig = {
release: commit + "-" + branch,
transport: new Raven.transports.HTTPSTransport({rejectUnauthorized: false}),
tags: {
shardId: process.env.id,
},
autoBreadcrumbs: true,
};
if (sentryEnv) {
ravenConfig.environment = sentryEnv
}
this.raven = new Raven.Client(this.fileAuth.data.sentryURL, ravenConfig);
this.raven.install(() => {
console.log("This is thy sheath; there rust, and let me die.");
process.exit(1);
});
this.raven.on("logged", (e) => {
git.branch((branch) => {
this.git = {commit, branch};
let ravenConfig = {
release: commit + "-" + branch,
transport: new ravenClient.transports.HTTPSTransport({rejectUnauthorized: false}),
tags: {
shardId: process.env.id,
},
autoBreadcrumbs: false,
};
if (sentryEnv) {
ravenConfig.environment = sentryEnv
}
this.raven = new ravenClient.Client(this.fileAuth.data.sentryURL, ravenConfig);
this.raven.install(function (err, sendErr, eventId) {
if (!sendErr) {
console.log('Successfully sent fatal error with eventId ' + eventId + ' to Sentry:');
console.error(err.stack);
} else {
console.error("Error sending fatal error to sentry: ", sendErr);