javascript - Error Object undefined for Express application -
i have setup express app. seems global error object undefined.
console.log(error) gives 'undefined' , , console.log(json.stringify(new error('error message')) gives {}
since error object undefined cannot return errors this
return next( new error( 'error message!' ) is possible error object renamed or something? there work around this?
(i used intellij idea construct express app.)
any appreciated.
error object not undefined. if was, throw typeerror:
console.log(json.stringify(new error('error message'))); instead, returning empty object, because v8 returns if send error object json.stringify(). i'm not sure if that's feature or bug or neither, regardless, give result expect:
console.log(new error('error message'));
Comments
Post a Comment