You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When connecting with the Slack RTM API with websocket_client as dep, I'm receiving a{:error, :nxdomain} error.
Initially I thought it was Slack which which didn't accept my proxy settings but later on debugging I found Slack sends me a 200 response and found that the websocket_client was the one who was not able to bypass my proxy settings.
I'm attaching my slack rtm api code here
def start_link(token, initial_state, client \\ :websocket_client) do
case Slack.Rtm.start(token) do
{:ok, rtm} ->
state = %{
rtm: rtm,
state: initial_state,
client: client,
token: token
}
url = String.to_char_list(rtm.url)
client.start_link(url, __MODULE__, state)
{:error, %HTTPoison.Error{reason: :connect_timeout}} ->
{:error, "Timed out while connecting to the Slack RTM API"}
{:error, %HTTPoison.Error{reason: :nxdomain}} ->
{:error, "Could not connect to the Slack RTM API"}
{:error, error} ->
{:error, error}
end
end
@jeshocarmel Did you solve this at the end? It looks like a proxy support in this websockets_client is required. We're hitting the same problem @ Elixir-Slack simply because websockets are not going through the proxy #bummer
dapdizzy
pushed a commit
to dapdizzy/websocket_client
that referenced
this issue
Jul 31, 2017
When connecting with the Slack RTM API with websocket_client as dep, I'm receiving a
{:error, :nxdomain}
error.Initially I thought it was Slack which which didn't accept my proxy settings but later on debugging I found Slack sends me a 200 response and found that the websocket_client was the one who was not able to bypass my proxy settings.
I'm attaching my slack rtm api code here
FYI I'm new to Erlang. Kindly help @jeremyong
The text was updated successfully, but these errors were encountered: