How to use @airbrake/browser - 2 common examples

To help you get started, we’ve selected a few @airbrake/browser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github airbrake / airbrake-js / packages / browser / examples / browserify / app.js View on Github external
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);
      }
    });
  }
}
github wmde / FundraisingFrontend / skins / laika / src / logger.ts View on Github external
constructor( host: string, projectKey: string ) {
		this.notifier = new Notifier( {
			host: host,
			projectId: 1,
			projectKey: projectKey,
		} );
	}

@airbrake/browser

Official Airbrake notifier for browsers

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis

Popular @airbrake/browser functions