Skip to content

Some unhandled paths in case expressions #118

Open
@CharlesOkwuagwu

Description

I'm seeing these types of errors. I believe they can be trapped so it does not bring down the server.

WhatsApp Image 2023-11-21 at 11 01 34 AM

Looking at the source:

elli/src/elli_http.erl

Lines 238 to 244 in 3ec3522

case elli_tcp:send(Req#req.socket, Response) of
ok -> ok;
{error, Closed} when Closed =:= closed orelse Closed =:= enotconn ->
#req{callback = {Mod, Args}} = Req,
handle_event(Mod, client_closed, [before_response], Args),
ok
end.

I suggest we add a catch-all for each of the case statements, this way we trap any unforeseen errors

Other Suggestions?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions