fix(nuxt): preserve error.data in response (#4755)

This commit is contained in:
Max Heilmann 2022-05-02 18:34:16 +02:00 committed by GitHub
parent b2d2388574
commit ffb9f71312
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,8 @@ export default <NitroErrorHandler> async function errorhandler (_error, event) {
message,
description: process.env.NODE_ENV === 'development' && statusCode !== 404
? `<pre>${stack.map(i => `<span class="stack${i.internal ? ' internal' : ''}">${i.text}</span>`).join('\n')}</pre>`
: ''
: '',
data: (_error as any).data
}
// Set response code and message