koajs / onerror

an error handler for koa, hack ctx.onerror
MIT License
140 stars 20 forks source link

How to response json when error happens? #26

Closed ghost closed 6 years ago

ghost commented 6 years ago

When errror happens, i want response json not render html page.

ghost commented 6 years ago

Client request should set header to accept json.