From 6b33d4d1ae83b7c1e6be4d5891dda5a1871d61aa Mon Sep 17 00:00:00 2001 From: Jonathan Ong Date: Wed, 18 Dec 2013 01:30:27 -0800 Subject: [PATCH 1/2] docs context: throw defaults to 500 --- docs/api/context.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/api/context.md b/docs/api/context.md index c0175fd..63689fd 100644 --- a/docs/api/context.md +++ b/docs/api/context.md @@ -1,4 +1,3 @@ - # Context A Koa Context encapsulates node's `request` and `response` objects @@ -114,8 +113,8 @@ ### ctx.throw(msg, [status]) Helper method to throw an error with a `.status` property - that will allow Koa to respond appropriately. The following - combinations are allowed: + defaulting to `500` that will allow Koa to respond appropriately. + The following combinations are allowed: ```js this.throw(403) @@ -135,4 +134,4 @@ throw err; `err.expose` meaning the messages are appropriate for client responses, which is typically not the case for error messages since you do not want to leak failure - details. + details. From e83e0022dd09be5f9c9eb4389585a4ec3249d8b5 Mon Sep 17 00:00:00 2001 From: Jonathan Ong Date: Wed, 18 Dec 2013 01:31:33 -0800 Subject: [PATCH 2/2] docs context: fix markdown jank breaks your styling, but your markdown styling creates bad list outputs --- docs/api/context.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/context.md b/docs/api/context.md index 63689fd..0b71e4d 100644 --- a/docs/api/context.md +++ b/docs/api/context.md @@ -95,7 +95,7 @@ - `signed` the cookie requested should be signed - Note: koa uses the [cookies](https://github.com/jed/cookies) module where options are simply passed. +Note: koa uses the [cookies](https://github.com/jed/cookies) module where options are simply passed. ### ctx.cookies.set(name, value, [options]) @@ -108,7 +108,7 @@ - `secure` secure cookie - `httpOnly` server-accessible cookie, __true__ by default - Note: koa uses the [cookies](https://github.com/jed/cookies) module where options are simply passed. +Note: koa uses the [cookies](https://github.com/jed/cookies) module where options are simply passed. ### ctx.throw(msg, [status])