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

Show 404 error instead of 500 when opening unsubscribe link of deleted contact #313

Open
almereyda opened this issue Jul 5, 2024 · 3 comments
Labels
bug Something isn't working ready to implement This issue is ready to be implemented.

Comments

@almereyda
Copy link

almereyda commented Jul 5, 2024

There were repeating unhandled exceptions in our log, which also didn't surface anywhere near an administrator backend.

14:24:27.655 [error] #PID<0.83010.0> running KeilaWeb.Endpoint (connection #PID<0.81100.0>, stream id 7) terminated
Server: keila.example.com:80 (http)
Request: GET /unsubscribe/np_X4V8agWa/nmr_9xLe8ngB/MTBVV3JlSF
** (exit) an exception was raised:
    ** (Plug.Conn.NotSentError) a response was neither set nor sent from the connection
        (phoenix 1.6.11) lib/phoenix/endpoint/cowboy2_handler.ex:80: Phoenix.Endpoint.Cowboy2Handler.maybe_send/2
        (phoenix 1.6.11) lib/phoenix/endpoint/cowboy2_handler.ex:55: Phoenix.Endpoint.Cowboy2Handler.init/4
        (cowboy 2.10.0) /deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2
        (cowboy 2.10.0) /deps/cowboy/src/cowboy_stream_h.erl:306: :cowboy_stream_h.execute/3
        (cowboy 2.10.0) /deps/cowboy/src/cowboy_stream_h.erl:295: :cowboy_stream_h.request_process/3
        (stdlib 5.2.3) proc_lib.erl:241: :proc_lib.init_p_do_apply/3

These should probably be turned into a proper error message.

@wmnnd
Copy link
Contributor

wmnnd commented Jul 5, 2024

Thank you for reporting this. When a contact no longer exists, this should show a 404 error instead of giving this 500 error.

@wmnnd wmnnd added the bug Something isn't working label Jul 5, 2024
@wmnnd wmnnd added the ready to implement This issue is ready to be implemented. label Dec 4, 2024
@github-project-automation github-project-automation bot moved this to Inbox & Ideas in Roadmap to 1.0 Dec 4, 2024
@wmnnd wmnnd moved this from Inbox & Ideas to Ready to implement in Roadmap to 1.0 Dec 4, 2024
@wmnnd wmnnd changed the title (Plug.Conn.NotSentError) a response was neither set nor sent from the connection Show 404 error instead of 500 when opening unsubscribe link of deleted contact Dec 4, 2024
@kevinam99
Copy link
Contributor

Opened a PR for this here #359

@kevinam99
Copy link
Contributor

Oh, this is already fixed to show a 200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready to implement This issue is ready to be implemented.
Projects
Status: Ready to implement
Development

No branches or pull requests

3 participants