We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Silently failing code
amos-kibet
Created
Such kinds of function calls can fail, and when they do, they don’t crash the server or raise an error:
Event.update(...)
This can take you a while before you understand why the code/tests are not working. You can fix this by pattern-matching on the return value, like so:
{:ok, _event} = Event.update(...)
and when a different result format is returned, like {:error, _}
, the server will crash and and the error raised.
Copy link
copied to clipboard