Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
feat: add statusCode as well
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Aug 10, 2022
1 parent dc75d92 commit 6d98255
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/nuxt/src/core/runtime/nitro/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export default <NitroErrorHandler> async function errorhandler (error: H3Error,
'[nuxt]',
'[request error]',
error.unhandled && '[unhandled]',
error.fatal && '[fatal]'
error.fatal && '[fatal]',
Number(errorObject.statusCode) !== 200 && `[${errorObject.statusCode}]`
].filter(Boolean).join(' ')
console.error(tags, errorObject.message + '\n' + stack.map(l => ' ' + l.text).join(' \n'))
}
Expand Down

0 comments on commit 6d98255

Please sign in to comment.