forcex icon indicating copy to clipboard operation
forcex copied to clipboard

Cannot process response from login or locating services

Open nilvon9wo opened this issue 6 years ago • 0 comments

Attempted

client = Forcex.Client.login |> Forcex.Client.locate_services

But received the following error:

19:06:57.558 [debug] conf=%{client_id: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client_secret: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", password: "XXXXXXXXXXXXXXXXXX", security_token: "XXXXXXXXXXXXXXXXXX", username: "[email protected]"} ** (FunctionClauseError) no function clause matching in Forcex.Api.Http.process_response/1

The following arguments were given to Forcex.Api.Http.process_response/1:

    # 1
    %{
      access_token: "00D2p0000014JnB!ARQAQNZmRl22T7HmPQ91LI4JWQgqAnPLkG4EVsFqx_CtC9Ji3WKrHK4A1MYw9J.xNS0rd8q1sromvFCPrygvIxz7VYaaWUtv",
      id: "https://login.salesforce.com/id/00D2p0000014JnBEAU/0052p000008uQRMAA2",
      instance_url: "https://eu26.salesforce.com",
      issued_at: "1563124019558",
      signature: "qWfGekFFad+0YkPCUN3HV5+i0ySWO3GooS7LuyrkdF0=",
      token_type: "Bearer"
    }

Attempted function clauses (showing 5 out of 5):

    defp process_response(-%HTTPoison.Response{body: body, headers: %{"Content-Encoding" => "gzip"} = headers} = resp-)
    defp process_response(-%HTTPoison.Response{body: body, headers: %{"Content-Encoding" => "deflate"} = headers} = resp-)
    defp process_response(-%HTTPoison.Response{body: body, headers: %{"Content-Type" => <<"application/json"::binary(), _::binary()>>} = headers} = resp-)
    defp process_response(-%HTTPoison.Response{body: body, status_code: 200}-)
    defp process_response(-%HTTPoison.Response{body: body, status_code: status}-)

(forcex) lib/forcex/api/http.ex:29: Forcex.Api.Http.process_response/1
(forcex) lib/forcex/api/http.ex:18: Forcex.Api.Http.raw_request/5
(forcex) lib/forcex/auth/oauth.ex:16: Forcex.Auth.OAuth.login/2
(forcex) lib/forcex/client.ex:71: Forcex.Client.login/2

nilvon9wo avatar Jul 14 '19 17:07 nilvon9wo