Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some unhandled paths in case expressions #118

Open
CharlesOkwuagwu opened this issue Nov 21, 2023 · 0 comments
Open

Some unhandled paths in case expressions #118

CharlesOkwuagwu opened this issue Nov 21, 2023 · 0 comments

Comments

@CharlesOkwuagwu
Copy link

CharlesOkwuagwu commented Nov 21, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant