From c2723c614cb8cbae75adca7ed1fe447a72180844 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Wed, 16 Feb 2022 08:24:37 +0100 Subject: [PATCH] filter GraphQL error --- frontend/src/main.js | 10 ---------- frontend/src/mixins/toaster.js | 1 + 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/frontend/src/main.js b/frontend/src/main.js index 25e417359..bcf80fbef 100755 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -21,16 +21,6 @@ Vue.config.productionTip = false Vue.mixin(toasters) -Vue.toasted.register( - 'error', - (payload) => { - return payload.replace(/^GraphQL error: /, '') - }, - { - type: 'error', - }, -) - loadAllRules(i18n) addNavigationGuards(router, store, apolloProvider.defaultClient) diff --git a/frontend/src/mixins/toaster.js b/frontend/src/mixins/toaster.js index 28a61365c..704eaf1a7 100644 --- a/frontend/src/mixins/toaster.js +++ b/frontend/src/mixins/toaster.js @@ -13,6 +13,7 @@ export const toasters = { }) }, toast(message, options) { + message = message.replace(/^GraphQL error: /, '') this.$bvToast.toast(message, { autoHideDelay: 5000, appendToast: false,