audius-terminal-player icon indicating copy to clipboard operation
audius-terminal-player copied to clipboard

Invalid API call / Missing status code check in API

Open manav2401 opened this issue 3 years ago • 0 comments

I tried installing it in mac os. On running the command audius, it panics and throws a json decoding error. On further investigating the error, it looks like the request happening in get_api_endpoint() function throws an error code 403 and hence the data in response is not json decodable. The same URL gives correct response on browser.

Possible solutions might be throw a user friendly error by checking r.status_code == 200 or add few additional headers so that your backend considers this request as if it's sent from a browser and then parse it.

manav2401 avatar Feb 07 '22 13:02 manav2401