8231_testToMaster_2448 #997

Merged
alexm merged 400 commits from 8231_testToMaster_2448 into master 2024-11-26 06:28:29 +00:00
2 changed files with 5 additions and 3 deletions
Showing only changes of commit 52981953f7 - Show all commits

View File

@ -3,6 +3,7 @@ import { useSession } from 'src/composables/useSession';
import { Router } from 'src/router';
import useNotify from 'src/composables/useNotify.js';
import { useStateQueryStore } from 'src/stores/useStateQueryStore';
import { CanceledError } from 'axios';
const session = useSession();
const { notify } = useNotify();
@ -42,7 +43,7 @@ const onResponseError = (error) => {
let message = '';
const response = error.response;
const responseData = response && response.data;
const responseData = response?.data;
const responseError = responseData && response.data.error;
if (responseError) {
message = responseError.message;
@ -78,7 +79,7 @@ const onResponseError = (error) => {
return Promise.reject(error);
}
notify(message, 'negative');
if (!(error instanceof CanceledError)) notify(message, 'negative');
return Promise.reject(error);
};

View File

@ -3,6 +3,7 @@ import qFormMixin from './qformMixin';
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 }) => {
@ -11,6 +12,6 @@ export default boot(({ app }) => {
app.directive('shortcut', keyShortcut);
app.config.errorHandler = function (err) {
console.error(err);
notify('globals.error', 'negative', 'error');
if (!(err instanceof CanceledError)) notify('globals.error', 'negative', 'error');
};
});