Skip to content

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

@almereyda

Description

@almereyda

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready to implementThis issue is ready to be implemented.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions