{gun_error, ConnPid, StreamRef, Reason} {gun_error, ConnPid, Reason} ConnPid :: pid() StreamRef :: reference() Reason :: any()
gun_error - Stream or connection-wide error
{gun_error, ConnPid, StreamRef, Reason} {gun_error, ConnPid, Reason} ConnPid :: pid() StreamRef :: reference() Reason :: any()
Stream or connection-wide error.
These messages inform the relevant process that an error occurred. A reference is given when the error pertains to a specific stream. Connection-wide errors do not imply that the connection is no longer usable, they are used for all errors that are not specific to a stream.
The pid of the Gun connection process.
Identifier of the stream that resulted in an error.
The reason for the error.
It is present for debugging purposes only. You should not rely on this value to perform operations programmatically.
handle_info({gun_error, ConnPid, _Reason}, State=#state{conn_pid=ConnPid}) -> %% Do something. {noreply, State}; handle_info({gun_error, ConnPid, _StreamRef, _Reason}, State=#state{conn_pid=ConnPid}) -> %% Do something. {noreply, State}.