Closed ndac-todoroki closed 7 years ago
For the body it looks like you're using a range for the limit. Instead try using just an integer. I'm not sure how httposion/hackney handles sending a range, but I would guess it doesn't (since I don't believe Erlang does at all). I can understand where the confusion lies based on the @spec
. Apologies if it's not clear! :^)
I'll look into this more tomorrow if this doesn't resolve the issue.
@Kraigie , thanks, and sorry for that. Soon after that I tried it with an integer, and still did not work.
After several investigations, it seems that passing API parameters as request bodies result to this crash. Changing this line to
case request(:get, Constants.guild_members(guild_id), "", params: options) do
solved the problem, with also changing constants.ex#L26 from
def guild_members(guild_id), do: "/guilds/#{guild_id}/members/"
to
def guild_members(guild_id), do: "/guilds/#{guild_id}/members"
(just removed the tailing slash. It'll be a 404 with it)
I'm not checking many other functions, so don't know if any other functions are affected by this problem. Also, while I referenced the master branch, I am using the stable one (the git one didn't get correct WS connections)
Ahh, yep. That makes sense. Any route that takes query string parameters should have that form.
By stable do you mean the Hex version? I'm interested in the inability to establish WS connections. There are known issues with OTP 20. Could you provide any errors? At this point the Hex version is horribly out of date, but I'm hesitant to publish an update with users running into this issue.
Thanks for taking the time to look into this!
OK, I'll open a new issue for that!
Fixed with 150b5725fdd0a9f740a9eb06e3b9917c237d41e2.
Also added a warning to the README for the second issue.
Thanks!
Using the method, it crashes with this output:
HTTPoison is crashing trying to parse this:
and I can't understand why Google is returning the error.