From c49b8ca82c6a41a14fb5a6eb0c99ee9c6967748d Mon Sep 17 00:00:00 2001 From: Manuel Kasper Date: Wed, 29 May 2024 20:45:49 +0200 Subject: [PATCH] Ignore (expected) error for HEAD request for AZ file --- src/components/Coordinates.vue | 2 +- src/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Coordinates.vue b/src/components/Coordinates.vue index c96e711..459c8a2 100644 --- a/src/components/Coordinates.vue +++ b/src/components/Coordinates.vue @@ -128,7 +128,7 @@ export default { if (!this.reference) { return } - axios.head(this.makeAzUrlForType('gpx')) + axios.head(this.makeAzUrlForType('gpx'), { ignoreError: true }) .then(response => { if (response.status === 200) { this.haveAz = true diff --git a/src/main.js b/src/main.js index 4598e19..3f7c17f 100644 --- a/src/main.js +++ b/src/main.js @@ -86,7 +86,7 @@ let lastError = null axios.interceptors.response.use(response => { return response }, error => { - if ((!lastError || new Date().getTime() - lastError > 9000) && (!error.response || error.response.status !== 404) && myVue) { + if (!error.config.ignoreError && (!lastError || new Date().getTime() - lastError > 9000) && (!error.response || error.response.status !== 404) && myVue) { // SnackbarProgrammatic.open doesn't work with Webpack 5 // See https://github.com/buefy/buefy/issues/2299 myVue.$buefy.snackbar.open({