mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
Merge pull request #2070 from clarkdo/nuxtserverinit_error
refactor: log nuxtServerInit error for better error tracing
This commit is contained in:
commit
0198a184b8
@ -91,7 +91,12 @@ export default async ssrContext => {
|
||||
** Dispatch store nuxtServerInit
|
||||
*/
|
||||
if (store._actions && store._actions.nuxtServerInit) {
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user