The problem is that if a response is not successful (not code 2xx) then it will still return {:ok, response}. The question is: should the library API wrap a non-successful response as {:ok, decoded} or {:error, decoded} ?
I came across this issue because I got a 503 response (service unavailable).
Hi,
It seems that when processing a response, not all status codes are covered. Only code 200 is handled.
https://github.com/straw-hat-team/bittrex/blob/e296e3f6602926d9eddd303ac474343838199634/lib/bittrex/client.ex#L34-L38
The problem is that if a response is not successful (not code 2xx) then it will still return
{:ok, response}
. The question is: should the library API wrap a non-successful response as{:ok, decoded}
or{:error, decoded}
?I came across this issue because I got a 503 response (service unavailable).