forked from verdnatura/salix-front
feat: refs #8039 show duplicate request in local
This commit is contained in:
parent
a732ec05fb
commit
2d81cffb33
|
@ -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