The timeout thing is confusing; I can understand the mixup with the other kind of GenServer timeout…
This is an old post about calls timing out GenServer call time-outs
tl;dr maybe you might want is something along the lines of
try do
{:ok, checksum} <- Checksum.calculate_checksum(String.to_integer(params["timeout"]))
conn
|> put_status(200)
|> put_view(ChecksumView)
|> render("checksum.json", checksum: checksum, message: "Checksum calculated successfully!")
catch
:exit, _value ->
conn
|> put_status(408)
|> put_view(ChecksumView)
|> render("408.json")
end
Bear in mind that the GenServer process and on completion “the reply message will be sent to the client and if unhandled will clutter the [client] mailbox”.
edit missed Genserver.call with timeout doesn't end up with :timeout message - #16 by lud on scanning through the thread - sorry pretty much what I said.