sdd / koa2-pixie-proxy

A proxy module for koa.js
3 stars 0 forks source link

Error body is ignored #7

Open vasyas opened 7 years ago

vasyas commented 7 years ago

Response body is ignored in case of HTTP error.

I guess fix would be to replace

   .catch(err => {
                ctx.body = err.reason;
                ctx.status = err.statusCode || 500;
            });

with

   .catch(err => {
                ctx.body = err.error;
                ctx.status = err.statusCode || 500;
            });