On Wed, Apr 11, 2012 at 11:36 AM, Doug Tangren <d
...@meetup.com> wrote:
> On Wed, Apr 11, 2012 at 9:54 AM, Mehdi <me...@shhmooze.com> wrote:
>> Hi,
>> I was testing the rate-limiting behaviour last night to make sure that
>> I mark rate-limited tokens as such to avoid making unnecessary API
>> calls that are sure to fail (and while testing, I saw that we're now
>> allowed 800 calls / hour, which should be far more than enough anyway
>> - but that's beside the point).
>> The doc indicates that the X-RateLimit-Reset HTTP header contains the
>> time when the rate limit gets reset. And it's indeed there on every
>> response... except on the 400 Bad Request response you get when you
>> get rate limited, which is precisely where you'd actually want to know
>> when you can start making requests again.
>> The doc suggests that I can check the status of an account by calling
>> the /members/?relation=self method but that doesn't work either when
>> you're rate-limited (I just get a 400 response).
>> So at this point I can mark a token as being rate-limited but there
>> doesn't seem to be any way to know when the restriction will get
>> lifted. Is there any workaround I missed?
> Good catch Mehdi. The request ratelimits are based on hourly windows. I
> will open a ticket to make sure the X-RateLimit headers are getting set
> when you fall over the threshold.
This should now be fixed. Http error responses triggered by a client going