Please note that this file only lists backwards incompatible changes. For full list of changes please check https://github.com/airbrake/airbrake-js/commits/master
jsonp
andxhr
reporters are removed, becausefetch
is supported in modern browsers with help of isomorphic-fetch.
- request lib is replaced with isomorphic-fetch on Node.js to decrease bundle size. You need to
npm install isomorphic-fetch
or re-configure notifier if you want to continue using request:
var airbrake = new AirbrakeClient({
...
request: request
});
- airbrake-js no longer rejects promises returned by
notify
to not trigger unhandled rejection warnings. Instead error is stored innotice.error
and promise is resolved. For example:
airbrake.notify(err).then(function(notice) {
if (notice.id) {
console.log('notice id:', notice.id);
} else {
console.log('notify failed:', notice.error);
}
});