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

500 server error on Campaign send via API #277

Open
dompie opened this issue Mar 19, 2024 · 1 comment
Open

500 server error on Campaign send via API #277

dompie opened this issue Mar 19, 2024 · 1 comment

Comments

@dompie
Copy link
Contributor

dompie commented Mar 19, 2024

Hello, I have a campaign with the following fields:

{
  "data": {
    "data": null,
    "id": "nmc_j7r4Bqg5",
    "inserted_at": "2024-03-19T10:40:51Z",
    "updated_at": "2024-03-19T10:41:35Z",
    "settings": {
      "type": "text"
    },
    "subject": "Send campaign test 19032024-104051",
    "text_body": null,
    "sender_id": "nms_weLJnLY5",
    "template_id": null,
    "sent_at": null,
    "scheduled_for": null,
    "segment_id": null
  }
}

When I send the campaign using the API, I get an "Internal server error" and the logs show the following:

10:41:35.405 request_id=F74kXjBoi_NgSnAAAIKi [info] POST /api/v1/campaigns/nmc_j7r4Bqg5/actions/send
10:41:35.410 [error] #PID<0.22114.0> running KeilaWeb.Endpoint (connection #PID<0.22109.0>, stream id 2) terminated
Server: keila.local:4000 (http)
Request: POST /api/v1/campaigns/nmc_j7r4Bqg5/actions/send
** (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) proc_lib.erl:241: :proc_lib.init_p_do_apply/3

But the E-Mails to contacts will be sent anyway.

I would strongly expect to have no e-mail sending at all, when the campaign sending API endpoint shows internal server error.

@dompie dompie changed the title 500 server error on Campaign send 500 server error on Campaign send via API Mar 19, 2024
@dompie
Copy link
Contributor Author

dompie commented Mar 19, 2024

Edit: Scheduling this campaign works as expected.

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