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(),