Skip to content

Commit

Permalink
chore(elixir): log warning in case of failure creating/updating a relay
Browse files Browse the repository at this point in the history
most likely cause, not authorized to overtake an existing relay.
  • Loading branch information
polvorin committed Oct 13, 2023
1 parent dbfd4b0 commit b764ffe
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,17 @@ defmodule Ockam.Services.Relay.StaticForwarding do
{:ok, req} ->
return_route = Message.return_route(message)
target_identifier = Message.local_metadata_value(message, :identity_id)
_ignored = subscribe(req.alias, req.tags, return_route, target_identifier, true, state)

case subscribe(req.alias, req.tags, return_route, target_identifier, true, state) do
{:ok, _addr} ->
:ok

{:error, reason} ->
Logger.warning(
"Error creating/updating relay (alias #{req.alias}) (caller identifier #{inspect(target_identifier)}) #{inspect(reason)}"
)
end

{:ok, state}

{:error, reason} ->
Expand Down

0 comments on commit b764ffe

Please sign in to comment.