Module has fixed the bug when the system didn't send the 4xx or 5xx statuses through cross-domain requests.
koa onerror
method have been completely replaced.
$ npm install koa-cors-error
var corsError = require('koa-cors-error');
app.post('/api/cors', cors, corsError, function *() {
this.throw(401);
});