express-async-errors icon indicating copy to clipboard operation
express-async-errors copied to clipboard

Express v5 support

Open jonchurch opened this issue 4 years ago • 3 comments

This PR aims to address and close #28

Currently a WIP with the goal of preparing for the release of Express v5 which adds async error support to route/middleware handlers.

This package also introduces promise support for param handling re: #12, which is a feature, at the time of opening, not planned for the Express v5 release.

This PR attempts to preserve the features that users of this package enjoy, while allowing them to upgrade to Express v5.

I will get some eyes on this from Express folks before moving from draft PR to something ready to be merged 👍

jonchurch avatar Apr 08 '20 04:04 jonchurch

There should also be an update made to the Readme here about upgrading to Express v5 which mentions that if users aren't using the promise based version of router.param then they are safe to remove this package and upgrade straight to v5.

jonchurch avatar Apr 08 '20 05:04 jonchurch

With https://github.com/pillarjs/router/pull/92 in the works, the course of this PR will likely change to make this library a no-op under v5, printing a message to let folks know that Express supports this functionality out of the box.

jonchurch avatar Apr 19 '20 02:04 jonchurch

For folks interested in more color on Express v5's async/await handling, @jonchurch wrote up a nice description here: https://github.com/expressjs/express/issues/4256#issuecomment-619616708

Thanks @jonchurch !!

rattrayalex avatar Aug 31 '21 00:08 rattrayalex