mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix: show server errors in console
This commit is contained in:
parent
19a943d44c
commit
e289edc67e
@ -352,6 +352,11 @@ export default class Renderer extends Tapable {
|
||||
err.message = err.message || 'Nuxt Server Error'
|
||||
err.name = (!err.name || err.name === 'Error') ? 'NuxtServerError' : err.name
|
||||
|
||||
// We hide actual errors from end users, so show them on server logs
|
||||
if (err.statusCode !== 404) {
|
||||
console.error(err) // eslint-disable-line no-console
|
||||
}
|
||||
|
||||
const sendResponse = (content, type = 'text/html') => {
|
||||
// Set Headers
|
||||
res.statusCode = err.statusCode
|
||||
|
Loading…
Reference in New Issue
Block a user