proxy parsing errors

This commit is contained in:
Alexander Strizhakov 2020-03-03 17:27:22 +03:00
parent 6ebf389d6e
commit aaa879ce75
No known key found for this signature in database
GPG key ID: 022896A53AEF1381

View file

@ -71,15 +71,15 @@ def parse_proxy(proxy) when is_binary(proxy) do
else else
{_, _} -> {_, _} ->
Logger.warn("parsing port in proxy fail #{inspect(proxy)}") Logger.warn("parsing port in proxy fail #{inspect(proxy)}")
{:error, :error_parsing_port_in_proxy} {:error, :invalid_proxy_port}
:error -> :error ->
Logger.warn("parsing port in proxy fail #{inspect(proxy)}") Logger.warn("parsing port in proxy fail #{inspect(proxy)}")
{:error, :error_parsing_port_in_proxy} {:error, :invalid_proxy_port}
_ -> _ ->
Logger.warn("parsing proxy fail #{inspect(proxy)}") Logger.warn("parsing proxy fail #{inspect(proxy)}")
{:error, :error_parsing_proxy} {:error, :invalid_proxy}
end end
end end
@ -89,7 +89,7 @@ def parse_proxy(proxy) when is_tuple(proxy) do
else else
_ -> _ ->
Logger.warn("parsing proxy fail #{inspect(proxy)}") Logger.warn("parsing proxy fail #{inspect(proxy)}")
{:error, :error_parsing_proxy} {:error, :invalid_proxy}
end end
end end