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
Specifically this exception occurs when I send an authenticated request to the Coinbase accounts endpoint.
I'm admittedly new to both Elixir and this library: but I suspect this error is being caused because the Coinbase API is returning an odd URI string which HTTPotion's normalize_location/2 function calls URI.merge/2 with the odd URI from the redirect, which is constructed without prepending http[s]:// to the URI. This causes the authority key in the URI struct to end up nil, meaning that URI.merge/2 is the specific version of the function being called. I'm trying to dig into the library a bit more to find out how to print the exact URI string that's being returned from the redirect.
This hasn't happened for the other Coinbase calls (this function for example), my suspicion is that when HTTPotion follows a redirect, the resulting string that URI is expected to parse is formed in a way that URI/HTTPotion doesn't expect.
If this isn't expected behavior, I'd like to submit a PR to prevent this exception from being thrown. Otherwise, guidance is appreciated.
The text was updated successfully, but these errors were encountered:
Making a
GET
request on a URI that follows redirects like so:Produces an ArgumentException from the URI module:
Specifically this exception occurs when I send an authenticated request to the Coinbase
accounts
endpoint.I'm admittedly new to both Elixir and this library: but I suspect this error is being caused because the Coinbase API is returning an odd URI string which HTTPotion's
normalize_location/2
function callsURI.merge/2
with the odd URI from the redirect, which is constructed without prependinghttp[s]://
to the URI. This causes theauthority
key in the URI struct to end up nil, meaning thatURI.merge/2
is the specific version of the function being called. I'm trying to dig into the library a bit more to find out how to print the exact URI string that's being returned from the redirect.This hasn't happened for the other Coinbase calls (this function for example), my suspicion is that when HTTPotion follows a redirect, the resulting string that
URI
is expected to parse is formed in a way that URI/HTTPotion doesn't expect.If this isn't expected behavior, I'd like to submit a PR to prevent this exception from being thrown. Otherwise, guidance is appreciated.
The text was updated successfully, but these errors were encountered: