-
Notifications
You must be signed in to change notification settings - Fork 235
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
Document the error thrown by send on no FS match #332
base: main
Are you sure you want to change the base?
Conversation
Why not use an error middleware, like in the Lines 18 to 53 in a9c56c7
That is the more common pattern of handling errors in a middleware application. |
@kitsonk I'm not sure what you mean. Do you mean adding a general purpose error handling middleware function in addition to the stack in the example? The purpose of adding this documentation is:
|
Hi @kitsonk Do you have more feedback for showing users how to use I'd love to make any changes needed so that this documentation can be merged and others won't have to go through the same confusion that I did before doing a review of this middleware source code. |
fwiw I found this PR extremely helpful. I also went through a bit of confusion when using |
Resolves #331
This documents the specific error thrown by
send()
when no filesystem entry is matched to the request path, and adds an example of how to handle the error in order to usesend()
in other positions in the middleware stack besides the very end.