Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function start() {
var Airbrake = require('@airbrake/browser');
var airbrake = new Airbrake.Notifier({
projectId: 1,
projectKey: 'FIXME',
});
try {
throw new Error('hello from Browserify');
} catch (err) {
airbrake.notify(err).then(function(notice) {
if (notice.id) {
console.log('notice id:', notice.id);
} else {
console.log('notify failed:', notice.error);
}
});
}
}
constructor( host: string, projectKey: string ) {
this.notifier = new Notifier( {
host: host,
projectId: 1,
projectKey: projectKey,
} );
}