pentacent / keila

Open Source Newsletter Tool.
https://keila.io
GNU Affero General Public License v3.0
1.38k stars 69 forks source link

Internal server error on campaign send via API #307

Open dompie opened 3 months ago

dompie commented 3 months ago

Hello,

I have a text campaign with sender, tracking and a segment that looks like this one: Screenshot 2024-06-25 at 12-32-48 Open Source Newsletter Tool · Keila

When I try to send it via swagger API, it looks like sometimes it's not working and I see an internal server error in swagger response: Screenshot 2024-06-25 at 12-35-21 Swagger UI

In the docker logs I see the following error:

keila-1  | 10:27:41.253 request_id=F9w4e5lctX8iY-0AAgrh [info] POST /api/v1/campaigns/nmc_GQL5QWLp/actions/send
keila-1  | 10:27:41.269 [error] #PID<0.15616.0> running KeilaWeb.Endpoint (connection #PID<0.15607.0>, stream id 5) terminated
keila-1  | Server: keila.local:4000 (http)
keila-1  | Request: POST /api/v1/campaigns/nmc_GQL5QWLp/actions/send
keila-1  | ** (exit) an exception was raised:
keila-1  |     ** (Plug.Conn.NotSentError) a response was neither set nor sent from the connection
keila-1  |         (phoenix 1.6.11) lib/phoenix/endpoint/cowboy2_handler.ex:80: Phoenix.Endpoint.Cowboy2Handler.maybe_send/2
keila-1  |         (phoenix 1.6.11) lib/phoenix/endpoint/cowboy2_handler.ex:55: Phoenix.Endpoint.Cowboy2Handler.init/4
keila-1  |         (cowboy 2.10.0) /deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2
keila-1  |         (cowboy 2.10.0) /deps/cowboy/src/cowboy_stream_h.erl:306: :cowboy_stream_h.execute/3
keila-1  |         (cowboy 2.10.0) /deps/cowboy/src/cowboy_stream_h.erl:295: :cowboy_stream_h.request_process/3
keila-1  |         (stdlib 5.2.3) proc_lib.erl:241: :proc_lib.init_p_do_apply/3

What's the cause for this? Can I fix this with another campaign config or is it some other keila internal stuff?

dompie commented 3 months ago

Addition: Although the internal server error happens. The campaign is sent anyway.