handle all not found errors

This commit is contained in:
Amir Mohamadi
2021-12-31 17:01:17 +03:30
parent 5c07791225
commit 064d642b7e
47 changed files with 3386 additions and 3238 deletions
+7 -3
View File
@@ -37,7 +37,7 @@
<nuxt-link :to="{name: 'lang',params: {lang: $route.params.lang}}" tag="li" exact class="">
<a>{{ staticData.home }}</a>
</nuxt-link>
<nuxt-link :to="{name: 'lang-about',params: {lang: $route.params.lang}}" tag="li" exact class="">
<nuxt-link :to="{name: 'lang-about',params: {lang: $route.params.lang}}" tag="li" class="">
<a>{{ staticData.about }}</a>
</nuxt-link>
<nuxt-link :to="{name: 'lang-services',params: {lang: $route.params.lang}}" tag="li" exact class="">
@@ -114,8 +114,12 @@ export default {
}
},
async fetch() {
let catalog = await this.$axios.get('/api/public/catalog')
this.catalog = catalog.data
try {
let catalog = await this.$axios.get('/api/public/catalog')
this.catalog = catalog.data
} catch (e) {
this.$nuxt.context.error({status: 404, message: 'Catalog file not found'})
}
},
computed: {
staticData() {