Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

trametheka
Copy link

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.

@0xTim
Copy link
Member

0xTim commented Jan 5, 2022

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants