mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(nuxt): log more context of prerendering errors (#28895)
This commit is contained in:
parent
3f508d521f
commit
a9385d04b4
@ -33,7 +33,7 @@ export default <NitroErrorHandler> async function errorhandler (error: H3Error,
|
|||||||
error.fatal && '[fatal]',
|
error.fatal && '[fatal]',
|
||||||
Number(errorObject.statusCode) !== 200 && `[${errorObject.statusCode}]`,
|
Number(errorObject.statusCode) !== 200 && `[${errorObject.statusCode}]`,
|
||||||
].filter(Boolean).join(' ')
|
].filter(Boolean).join(' ')
|
||||||
console.error(tags, errorObject.message + '\n' + stack.map(l => ' ' + l.text).join(' \n'))
|
console.error(tags, (error.message || error.toString() || 'internal server error') + '\n' + stack.map(l => ' ' + l.text).join(' \n'))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.handled) { return }
|
if (event.handled) { return }
|
||||||
|
Loading…
Reference in New Issue
Block a user