keymetrics / pm2-io-apm

PM2.io APM for Node.JS
Apache License 2.0
147 stars 40 forks source link

Koa error handler swallows errors #230

Closed CherryDT closed 5 years ago

CherryDT commented 5 years ago

As soon as the koaErrorHandler middleware is added, errors become a 404 and get swallowed instead of getting handled by the other error handlers.

This is because your middleware is missing a throw err; at the end of the catch block.