leaf-error-middleware
leaf-error-middleware copied to clipboard
Adds the option to only handle notFound or other server errors.
Thanks for the middleware, works well. You may not be interested in this, thought I'd upstream it just in case you were (or even had a better solution). I basically needed leaf coverage for a whole app for .notFound, but only needed leaf coverage for certain routes for all other errors (app has both leaf and json/rest routes). Be nice if the NIO errors enum was an OptionSet.
Not a breaking change either.
Cheers.
@trametheka apologies I missed this one! I like the idea of the PR though it might be a little out of scope for Leaf Middleware. However, if you'd like to update the PR to work with the existing release then I'll merge it! Unfortunately it may be a fair bit of work since LeafMiddleware has moved to async/await