A monkey patch to express 4 to better handle promises in handlers (i.e. async methods)


1.0.43 years ago5 years agoMinified + gzip package size for @gasbuddy/express-promise-patch in KB



A simple patch to express 4.x to better deal with async handler methods. Without this patch, exceptions in these methods will usually end up as uncaughtRejections disassociated from the request that caused them. This patch normalizes them back to calls to next() with the error.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.