-
Notifications
You must be signed in to change notification settings - Fork 230
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
Improve documentation for serving static content #331
Comments
The concept is that something that should be caught and acted upon. a Lines 18 to 53 in a9c56c7
|
Ref: #214
After reviewing the source for the
send
method, it seems that the function is not designed to be used in any place except the tail end of the middleware stack, since it throws (anHttpError
with status404
) when there is no match.This seems rather opinionated (which is fine), but it was not very intuitive for me, and I think it needs to be documented.
It would be nice to provide a configuration option for
send
(andcontext.send
) so that this behavior can be changed — e.g. to allow invokingnext
(instead of throwing) when no match is found, so that it can used in other positions in the middleware stack.The text was updated successfully, but these errors were encountered: