diff --git a/lib/app/server.js b/lib/app/server.js index df23de17c2..6568b97f49 100644 --- a/lib/app/server.js +++ b/lib/app/server.js @@ -91,7 +91,12 @@ export default async ssrContext => { ** Dispatch store nuxtServerInit */ if (store._actions && store._actions.nuxtServerInit) { - await store.dispatch('nuxtServerInit', app.context) + try { + await store.dispatch('nuxtServerInit', app.context) + } catch (err) { + debug('error occurred when calling nuxtServerInit: ', e.message) + throw err + } } // ...If there is a redirect or an error, stop the process if (ssrContext.redirected) return noopApp()