jfromaniello / express-unless

Conditionally add a middleware to express with some common patterns
MIT License
178 stars 27 forks source link

Promise (rejections) handling #43

Open nathanlepori opened 1 year ago

nathanlepori commented 1 year ago

Reopening this PR now aligned with latest commit. Also includes @ryus08's suggestion on previous PR

Replaces #32

Solves #31

nathanlepori commented 1 year ago

Not really sure how to test this as it would require express' error handling logic to be incorporated in the tests (not to mention it would need 2 different versions). Suggestions are welcome and I'll be happy to implement some tests if needed:)