handle all not found errors
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user