Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 619 Bytes

README.md

File metadata and controls

24 lines (19 loc) · 619 Bytes

Vue.js error handler

You can start reporting errors from your Vue.js app by configuring an errorHandler that uses an AirbrakeClient initialized with your projectId and projectKey.

import AirbrakeClient from 'airbrake-js';

var airbrake = new AirbrakeClient({
  projectId: 1,
  projectKey: 'FIXME'
});

Vue.config.errorHandler = function (err, vm, info) {
  airbrake.notify({
    error: err,
    params: {info: info}
  });
}

For more information on Vue.js error handling, read the errorHandler documentation.