https://github.com/bpcloud/middleware
Setup.
import { Application } from 'bpframework';
import * as middleware_bodyparser from '@bpframework/middleware-koa-bodyparser';
// bodyparser middleware is used by default.
Application.use(middleware_bodyparser.middleware({
onErrorBodyParser: (err:any, ctx:koa.Context)=>{
ctx.response.status = 415;
}
}));
Application.runKoa(...);