0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 04:30:25 +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:
Loïc Hoguin 2014-09-24 15:03:10 +03:00
parent aa4d86b81f
commit c56bada509
8 changed files with 8 additions and 31 deletions

View file

@ -22,7 +22,6 @@ optionally with its contents modified.
-> {ok, Req, Env}
| {suspend, Module, Function, Args}
| {halt, Req}
| {error, StatusCode, Req}
Types:
@ -31,7 +30,6 @@ Types:
* Module = module()
* Function = atom()
* Args = [any()]
* StatusCode = cowboy:http_status()
Execute the middleware.
@ -47,8 +45,3 @@ The `halt` return value stops Cowboy from doing any further
processing of the request, even if there are middlewares
that haven't been executed yet. The connection may be left
open to receive more requests from the client.
The `error` return value sends an error response identified
by the `StatusCode` and then proceeds to terminate the
connection. Middlewares that haven't been executed yet
will not be called.