Closed VandorpeDavid closed 8 years ago
Hi @VandorpeDavid, thank you for the pull request! There is nothing inherently wrong with throwing in the base function, as middleware are expected to be within a try
catch
block. Otherwise, I think changing it to next(err)
is easy enough. I don't think we need to preserve the current behavior, and should just classify this as a bug.
Use
next(err)
instead of throw err when the developer prefers this behavior. Fixes #78 .To enable this behavior, set
options.throwErrors
tofalse
.