bttmly / koa-detour

An expressive router for Koa v2 applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OPTION, HEAD, 405 handlers don't play well with `handleSuccess`, `handleError`

bttmly opened this issue · comments

The results or errors of OPTION, HEAD, and 405 handlers should be handled the same was as results or errors from the normal middleware stack or matched resource.

Note how error/success handling isn't implemented in this conditional block:
https://github.com/nickb1080/koa-detour/blob/master/lib/index.js#L37-L47