11

Airbrake's Vue configuration page is still about Vue 2:

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

What is the equivalent for Vue.js 3?

Lee Goddard
  • 10,680
  • 4
  • 46
  • 63
akauppi
  • 17,018
  • 15
  • 95
  • 120

1 Answers1

21

It's the same in vue 3 with a little change which is the use of Vue instead (instance of createApp()) instance of Vue class :

import { createApp } from "vue";
import App from "./App.vue";

let app=createApp(App)

app.config.errorHandler = function (err, vm, info) {
  airbrake.notify({
    error: err,
    params: {info: info}
  });
}
app.mount("#app");

Boussadjra Brahim
  • 82,684
  • 19
  • 144
  • 164