5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 17:26:21 +00:00
panel/app/javascript/packs/application.js
f 79be9538bb
fix: ignorar los errores de abort de htmx
el problema es que cuando se envía un abort a htmx, se loguea un mensaje
de todas formas.

closes #15880

closes #15881

closes #15883

closes #15884

closes #15893

closes #15894

closes #15973

closes #15974

closes #15975

closes #16003

closes #16004

closes #16015

closes #16016

closes #16023

closes #16024

closes #16050

closes #16051

closes #16063

closes #16064

closes #16073

closes #16074

closes #16116

closes #16125

closes #16126
2024-04-30 17:45:33 -03:00

44 lines
1,016 B
JavaScript

/* eslint no-console:0 */
import { Notifier } from '@airbrake/browser'
try {
window.airbrake = new Notifier({
projectId: window.env.AIRBRAKE_PROJECT_ID,
projectKey: window.env.AIRBRAKE_PROJECT_KEY,
host: window.env.PANEL_URL
});
const ignoredErrors = ["htmx:afterRequest", "htmx:sendAbort"];
console.originalError = console.error;
console.error = (...e) => {
const msg = e.join(" ");
if (!ignoredErrors.some(x => msg.includes(x))) {
window.airbrake.notify(e.join(" "));
}
return console.originalError(...e);
};
} catch(e) {
console.error(e);
}
import 'core-js/stable'
import 'regenerator-runtime/runtime'
import 'controllers'
import 'editor/editor'
import 'fork-awesome/scss/fork-awesome.scss'
import 'etc'
import Rails from '@rails/ujs'
import Turbolinks from 'turbolinks'
import * as ActiveStorage from '@rails/activestorage'
import 'chartkick/chart.js'
Rails.start()
Turbolinks.start()
ActiveStorage.start()
window.htmx = require('htmx.org/dist/htmx.js')