Files
smart-admin/smart-admin-h5/src/plugins/smart-sentry.js
zhuoda 1f75c9614e v1.x
2022-11-05 22:38:44 +08:00

18 lines
416 B
JavaScript

import * as Sentry from '@sentry/browser';
const SmartSentry = {};
SmartSentry.install = function(Vue, options) {
Vue.prototype.$smartSentry = {
captureException: (error) => {
console.error(error);
if (error.config && error.data && error && error.headers && error.request && error.status) {
return;
}
Sentry.captureException(error);
}
};
};
export default SmartSentry;