early_error(StreamID, Reason, PartialReq, Resp, Opts) -> Resp StreamID :: cowboy_stream:stream_id() Reason :: cowboy_stream:reason() PartialReq :: cowboy_stream:partial_req() Resp :: cowboy_stream:resp_command() Opts :: cowboy:opts()
cowboy_stream:early_error - Handle an early error for a stream
early_error(StreamID, Reason, PartialReq, Resp, Opts) -> Resp StreamID :: cowboy_stream:stream_id() Reason :: cowboy_stream:reason() PartialReq :: cowboy_stream:partial_req() Resp :: cowboy_stream:resp_command() Opts :: cowboy:opts()
Handle an early error for a stream.
This function should be called by all stream handlers. It will propagate the early error to the next configured stream handler.
The stream ID.
Reason for termination.
The request data that has been received so far.
The response that will be sent as a result of the early error.
It may be modified by the stream handler before or after being propagated to the next handler.
The protocol options.
The response to be sent as a result of the early error.
early_error(StreamID, Reason, PartialReq, Resp, Opts) ->
cowboy_stream:early_error(StreamID, Reason, PartialReq, Resp, Opts).
cowboy_stream(3), cowboy_stream:init(3), cowboy_stream:data(3), cowboy_stream:info(3), cowboy_stream:terminate(3)
Support my work on Cowboy, Ranch, Gun and Erlang.mk via GitHub Sponsors. The funds cover domain names and development tools.