mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
Remove the error tuple return value for middlewares
It wasn't interesting compared to simply returning a halt tuple with an explicit reply.
This commit is contained in:
parent
aa4d86b81f
commit
c56bada509
8 changed files with 8 additions and 31 deletions
|
@ -24,7 +24,6 @@ Middlewares can return one of four different values:
|
|||
* `{ok, Req, Env}` to continue the request processing
|
||||
* `{suspend, Module, Function, Args}` to hibernate
|
||||
* `{halt, Req}` to stop processing and move on to the next request
|
||||
* `{error, StatusCode, Req}` to reply an error and close the socket
|
||||
|
||||
Of note is that when hibernating, processing will resume on the given
|
||||
MFA, discarding all previous stacktrace. Make sure you keep the `Req`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue