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:
parent
0e17984d6f
commit
03e46f81f8
12 changed files with 57 additions and 36 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue