Since we cannot control what is returned from a user's mod.handle_head, mod.handle_body or mod.handle_tail, we could use this catch all to throw a controlled exception informing that the expected return format is violated:
defp normalise_reaction(_any, _state) do
throw "Invalid return format"
end
Looking at the complaints of crashes, maybe this might help narrow down the source of the crashes
https://github.com/CrowdHailer/Ace/blob/a895cc00351e1099b4ad41025d18cbb5ddf0aab7/lib/ace/http/worker.ex#L88-L95
Since we cannot control what is returned from a user's
mod.handle_head
,mod.handle_body
ormod.handle_tail
, we could use this catch all to throw a controlled exception informing that the expected return format is violated:Looking at the complaints of crashes, maybe this might help narrow down the source of the crashes