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
When making an api call, if reddit reports there's no rate limit left (ie: you just used up the last api call for the 10 minute period), the library doesn't bother building a response using the response body, instead short circuiting out with a RateLimitError.
It checks the response, but if there is a header from the reddit api saying there's no rate limit remaining, it will return an error. See here:
It should only return an empty response body if there's no body from reddit. As the rate limit is reduced by each api call for the 10 minute period, the last api call will incorrectly return an error.
The text was updated successfully, but these errors were encountered:
When making an api call, if reddit reports there's no rate limit left (ie: you just used up the last api call for the 10 minute period), the library doesn't bother building a response using the response body, instead short circuiting out with a RateLimitError.
It checks the response, but if there is a header from the reddit api saying there's no rate limit remaining, it will return an error. See here:
https://github.com/vartanbeno/go-reddit/blob/master/reddit/reddit.go#L450
It will return an empty response object, without reading any response body from the reddit api, which is a bug. See here:
https://github.com/vartanbeno/go-reddit/blob/master/reddit/reddit.go#L366
It should only return an empty response body if there's no body from reddit. As the rate limit is reduced by each api call for the 10 minute period, the last api call will incorrectly return an error.
The text was updated successfully, but these errors were encountered: