Merge pull request #87 from EYHN/master

fix: error message useful for developers
This commit is contained in:
DIYgod 2018-05-06 23:38:42 +08:00 committed by GitHub
commit d6c3b17a19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ module.exports = async (ctx, next) => {
try {
await next();
} catch (err) {
logger.error('Promise error: ' + err);
logger.error('Promise error: ' + (err instanceof Error ? err.stack : err));
ctx.set({
'Content-Type': 'text/html; charset=UTF-8',
});