-1👍
In your catch you can redirect user to error page by
return this.$nuxt.error({ statusCode: 500, message: 'your error message' })
your error.vue page, you can access it with an error prop like:
<p>{{ error.statusCode }}</p>
<p>{{ error.message }} </p>
i will work fine
- [Vuejs]-Where to listen for events using eventBus in vuejs
- [Vuejs]-Component to emit event on mapGetters
Source:stackexchange.com