1
0
Fork 0
mirror of https://github.com/benbusby/farside.git synced 2025-06-08 10:26:36 +00:00

add error handling

This commit is contained in:
mithereal 2022-09-17 03:38:06 -07:00
parent 0e17984d6f
commit 03e46f81f8
12 changed files with 57 additions and 36 deletions

View file

@ -110,11 +110,12 @@ defmodule Farside do
end
|> Enum.reject(fn x -> x == nil end)
service = Map.put(
service,
:instances,
instances
)
service =
Map.put(
service,
:instances,
instances
)
case Enum.count(service.instances) > 0 do
true -> Enum.random(service.instances)