leaf-error-middleware icon indicating copy to clipboard operation
leaf-error-middleware copied to clipboard

Adds the option to only handle notFound or other server errors.

Open trametheka opened this issue 4 years ago • 1 comments

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 avatar Jul 06 '21 06:07 trametheka

@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

0xTim avatar Jan 05 '22 13:01 0xTim