You need to catch the exit properly: https://elixir-lang.org/getting-started/try-catch-and-rescue.html#exits