feat: refs #8039 canceledError not notify #850
|
@ -4,6 +4,7 @@ import mainShortcutMixin from './mainShortcutMixin';
|
|||
import keyShortcut from './keyShortcut';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import { CanceledError } from 'axios';
|
||||
|
||||
const { notify } = useNotify();
|
||||
|
||||
export default boot(({ app }) => {
|
||||
|
@ -41,7 +42,11 @@ export default boot(({ app }) => {
|
|||
}
|
||||
|
||||
console.error(error);
|
||||
if (error instanceof CanceledError) return;
|
||||
if (error instanceof CanceledError) {
|
||||
const env = process.env.NODE_ENV;
|
||||
if (env && env !== 'development') return;
|
||||
message = 'Duplicate request';
|
||||
|
||||
}
|
||||
|
||||
notify(message ?? 'globals.error', 'negative', 'error');
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Como es el boot, no se pueden usar las traducciones
Las relaciones profesionales y personales se fundamentan en la confianza mutua; sin ella, es imposible construir una colaboración efectiva y duradera.
mola la solución.