koajs / koa-body

koa body parser middleware
MIT License
950 stars 130 forks source link

Fix promise error handling order #59

Closed RobertHerhold closed 7 years ago

RobertHerhold commented 7 years ago

As it is currently, any errors that are thrown in any middleware after the body parser are caught and passed through the onError config option. This pull request fixes the order so that only body parsing errors are passed to the onError function, not all errors from other middleware.

dlau commented 7 years ago

Hi thanks for the pr. I'll look at this over the weekend.

MarkHerhold commented 7 years ago

@dlau Could you publish a release when you get a chance?

dlau commented 7 years ago

published in 2.3.0