Skip to content

Commit

Permalink
Handle error on start_link
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksiri committed Nov 5, 2024
1 parent b3defb8 commit 15746c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/lexdee/observer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ defmodule Lexdee.Observer do
with {:ok, pid} <- GenServer.start_link(__MODULE__, options, []),
{:ok, :connected} <- GenServer.call(pid, :connect) do
{:ok, pid}
else
{:error, reason} -> {:error, reason}
end
end

Expand Down

0 comments on commit 15746c2

Please sign in to comment.