I have setup an Error page like its described in the docs. But now whenever I send a status of bad request in the response, its going to the Error page.
primaryBtn() {
if (!this.$store.state.authenticated) {
this.book_error = 'Please login to continue.'
}
else {
const day = `${this.selected_date} ${this.selected_time}`
const url = `api/check/`
const data = {
"date": moment(dt, "DD MMM YYYY").format('YYYY-MM-DD'),
"time": this.selected_time
}
this.$axios.post(url, data)
.then(response => {
// OK
})
.catch(error => {
// Object not found response... REDIRECTS to the Error page.
})
}
}
I would like to have an Error page, but in this case I need to display the error message in the Present page, instead of redirecting to the Error page. Is there anyway to stop from redirecting to the Error page?
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2476">#c2476</a>)</em></sub></div>