From 29e1a03d4ddc07aa0649f6f1b4745fb2989bed86 Mon Sep 17 00:00:00 2001 From: "R.Piontik" Date: Sat, 13 Jan 2024 13:03:17 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B2=D0=B5=D1=87=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=BA=D0=BE=D0=BB?= =?UTF-8?q?=D0=B5=D1=81=D0=B0=20=D0=BF=D1=80=D0=B8=20=D0=BE=D1=82=D1=81?= =?UTF-8?q?=D1=83=D1=82=D1=81=D0=B2=D0=B8=D0=B8=20=D0=B4=D0=BE=D0=BA=D1=83?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/components/Docs/DocMixin.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/frontend/components/Docs/DocMixin.js b/src/frontend/components/Docs/DocMixin.js index b30ffa65..6f249163 100644 --- a/src/frontend/components/Docs/DocMixin.js +++ b/src/frontend/components/Docs/DocMixin.js @@ -25,11 +25,14 @@ export default { created: function() { this.$parent.$on('appendError', (error) => { let message = (error?.message || error); - if (error.config) { - const link = error.config.url.toString(); + if (error.response) { const description = error.response?.data?.error || JSON.stringify(error.response?.data); - message = (description ? `
${description}
` : '') + `${message}

URL:${link}

`; - } + message = (description ? `
${description}
` : ''); + if (error.config) { + const link = error.config.url.toString(); + message += `${message}

URL:${link}

`; + } + } this.errors.push( { key: Date.now(),