handle all not found errors
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="s2" v-if="history.length">
|
||||
<section class="s2" v-if="history.length" id="history_timeline">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -157,10 +157,14 @@ export default {
|
||||
title: this.staticData.hero
|
||||
}
|
||||
},
|
||||
async asyncData({$axios}) {
|
||||
const history = await $axios.get(`/api/public/history`)
|
||||
return {
|
||||
history: history.data
|
||||
async asyncData({$axios, error}) {
|
||||
try {
|
||||
const history = await $axios.get(`/api/public/history`)
|
||||
return {
|
||||
history: history.data
|
||||
}
|
||||
} catch (e) {
|
||||
error({status: 404, message: 'There is problem here'})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user