0
0
Fork 0

feat: refs #8039 show duplicate request in local

This commit is contained in:
Alex Moreno 2024-10-22 13:34:20 +02:00
parent a732ec05fb
commit 2d81cffb33
1 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import mainShortcutMixin from './mainShortcutMixin';
import keyShortcut from './keyShortcut'; import keyShortcut from './keyShortcut';
import useNotify from 'src/composables/useNotify.js'; import useNotify from 'src/composables/useNotify.js';
import { CanceledError } from 'axios'; import { CanceledError } from 'axios';
const { notify } = useNotify(); const { notify } = useNotify();
export default boot(({ app }) => { export default boot(({ app }) => {
@ -41,7 +42,11 @@ export default boot(({ app }) => {
} }
console.error(error); 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'); notify(message ?? 'globals.error', 'negative', 'error');
}; };