mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 00:06:21 +00:00
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
This commit is contained in:
parent
5f0672bcae
commit
79be9538bb
1 changed files with 8 additions and 1 deletions
|
@ -9,9 +9,16 @@ try {
|
|||
host: window.env.PANEL_URL
|
||||
});
|
||||
|
||||
const ignoredErrors = ["htmx:afterRequest", "htmx:sendAbort"];
|
||||
|
||||
console.originalError = console.error;
|
||||
console.error = (...e) => {
|
||||
window.airbrake.notify(e.join(" "));
|
||||
const msg = e.join(" ");
|
||||
|
||||
if (!ignoredErrors.some(x => msg.includes(x))) {
|
||||
window.airbrake.notify(e.join(" "));
|
||||
}
|
||||
|
||||
return console.originalError(...e);
|
||||
};
|
||||
} catch(e) {
|
||||
|
|
Loading…
Reference in a new issue