How to use the @bugsnag/browser function in @bugsnag/browser

To help you get started, we’ve selected a few @bugsnag/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 bugsnag / bugsnag-js / test / browser / features / fixtures / handled / typescript / src / c.ts View on Github external
import bugsnag from '@bugsnag/browser'
import config from './lib/config'

var bugsnagClient = bugsnag(config)

go()
  .then(function () {})
  .catch(function (e: any) {
    bugsnagClient.notify(e)
  })

function go() {
  return Promise.reject(new Error('bad things'))
}
github bugsnag / bugsnag-js / test / browser / features / fixtures / handled / typescript / src / b.ts View on Github external
declare var foo: any

import bugsnag from '@bugsnag/browser'
import config from './lib/config'

var bugsnagClient = bugsnag(config)

try {
  foo.bar()
} catch (e) {
  bugsnagClient.notify(e)
}
github bugsnag / bugsnag-js / test / browser / features / fixtures / plugin_angular / ng / src / app / bugsnag.ts View on Github external
import bugsnag from '@bugsnag/browser';

var ENDPOINT = decodeURIComponent(window.location.search.match(/ENDPOINT=([^&]+)/)[1])
var API_KEY = decodeURIComponent(window.location.search.match(/API_KEY=([^&]+)/)[1])

const bugsnagClient = bugsnag({
  apiKey: API_KEY,
  endpoints: {
    notify: ENDPOINT
  },
  beforeSend: (report) => {
  }
});

export default bugsnagClient;
github bugsnag / bugsnag-js / packages / browser / features / fixtures / handled / rollup / src / a.js View on Github external
import bugsnag from '@bugsnag/browser'
import config from './lib/config'

var bugsnagClient = bugsnag(config)

bugsnagClient.notify(new Error('bad things'))

@bugsnag/browser

Bugsnag error reporter for browser JavaScript

MIT
Latest version published 27 days ago

Package Health Score

89 / 100
Full package analysis

Similar packages