turtle
turtle copied to clipboard
Crash without logging when `durable` clashes
Tried adding a publisher to a supervisor and the entire app crashed with little information.
{"Kernel pid terminated",application_controller,"{application_terminated,huginn_hydra,shutdown}"}
Crash dump is being written to: erl_crash.dump...done
Kernel pid terminated (application_controller) ({application_terminated,huginn_hydra,shutdown})
make: *** [console] Error 1
With the help of @ahf we found that durable = false
in the publisher while the Exchange was already running with durable = true
[error] gen_server <0.946.0> terminated with reason: {{shutdown,{server_initiated_close,406,<<"PRECONDITION_FAILED - inequivalent arg 'durable' for exchange 'shopgun.hydra_events' in vhost '/': received 'false' but current is 'true'">>}},{gen_server,call,[<0.950.0>,{call,{'exchange.declare',0,<<"shopgun.hydra_events">>,<<"topic">>,false,false,false,false,false,[]},none,<0.946.0>},infinity]}} in gen_server:call/3 line 212
This error was only exposed by running my_sup:start_link().
from console, could be nice to have that error when starting normally.
Yes, this is inconvenient. The first step is to make a small reproducible case where this happens, so we can make sure we nail it.