fix: v1 artifact "this" reference (#711)

master
d3v 2016-04-20 08:15:11 +02:00 committed by Yiyu He
parent 54e58d3523
commit e0a0d9f7cc
1 changed files with 2 additions and 2 deletions

View File

@ -40,8 +40,8 @@ app.use(async (ctx, next) => {
await next();
} catch (err) {
// will only respond with JSON
this.status = err.statusCode || err.status || 500;
this.body = {
ctx.status = err.statusCode || err.status || 500;
ctx.body = {
message: err.message
};
}