From e0a0d9f7cc978b7e376d1fea8634df40ad11759e Mon Sep 17 00:00:00 2001 From: d3v Date: Wed, 20 Apr 2016 08:15:11 +0200 Subject: [PATCH] fix: v1 artifact "this" reference (#711) --- docs/error-handling.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/error-handling.md b/docs/error-handling.md index 6fc579d..ba4abef 100644 --- a/docs/error-handling.md +++ b/docs/error-handling.md @@ -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 }; }