Home

Issue: 964

nuxtServerInit - how to handle errors?

[issue link]

Hi!

I need to initialize store with the data from the remote server.
I do it in the nuxtServerInit.

How can I handle error (eg. no connection to the remote server) in the nuxtServerInit?

I ask becouse documentation says that there in no error in the context:

The context is given to nuxtServerInit as the 2nd argument, it is the same as the data or fetch method except that context.redirect() and context.error() are omitted.

This question is available on Nuxt.js community (#c835)