From 7f00c6c3cfb5570c1a665547ab9b1fb9a90f546a Mon Sep 17 00:00:00 2001 From: William Chong Date: Mon, 4 Sep 2023 19:53:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=8A=20capture=20console.error=20in?= =?UTF-8?q?=20sentry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nuxt.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/nuxt.config.js b/nuxt.config.js index 602a05eb..906d29bc 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -150,6 +150,7 @@ export default { clientIntegrations: { /* default integrations will still be added due to deep-merge */ ReportingObserver: false, // reporting is very noisy on CSP violation. + CaptureConsole: { levels: ['error'] }, }, }, sitemap: { From ceccb54cb88bf03d073c4f399d954c711839772f Mon Sep 17 00:00:00 2001 From: William Chong Date: Tue, 5 Sep 2023 16:19:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=87=20Do=20not=20show=20404=20in?= =?UTF-8?q?=20console=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/view/_iscnId.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pages/view/_iscnId.vue b/pages/view/_iscnId.vue index 3f44378b..10db3f43 100644 --- a/pages/view/_iscnId.vue +++ b/pages/view/_iscnId.vue @@ -855,8 +855,10 @@ export default class ViewIscnIdPage extends Vue { this.isPreminted = !!data.classId } catch (err) { this.isPreminted = false - // eslint-disable-next-line no-console - console.error(err) + if ((err as any).response?.status !== 404) { + // eslint-disable-next-line no-console + console.error(err); + } } } }