docs: clarify error handlers are final and don't call next()#7646
docs: clarify error handlers are final and don't call next()#7646code-asher merged 3 commits intocoder:mainfrom
Conversation
code-asher
left a comment
There was a problem hiding this comment.
Thanks for the PR! I am not convinced we need the comment, to me the end is self-explanatory.
We also make no such comments for why the non-websocket error handler also does not call next(), so it seems inconsistent.
I think it would make more sense as a comment on wsErrorHandler and errorHandler themselves though, because those would show up in the documentation when calling the functions, where end would not be visible and thus less self-explanatory. Something like:
This handler does not call
nexteven though it accepts it as an argument. It should only be used as the final handler for a route.
Thanks for the review! Good point — I agree the inline comment near |
Summary
errorHandlerandwsErrorHandlerclarifying they are final handlers and intentionally do not callnext().Rationale
Test plan