Document the error thrown by send on no FS match#332
Document the error thrown by send on no FS match#332jsejcksn wants to merge 3 commits intooakserver:mainfrom
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.