adamwynne / twitter-api

Async io interface to all the twitter APIs
372 stars 64 forks source link

Include reset time in rate limit exception #59

Closed juxtin closed 9 years ago

juxtin commented 9 years ago

Previously, requests that tripped Twitter's rate limit would not provide any indication of how long one should wait before repeating the request. This commit adds a new exception matcher that checks the response headers for the next reset time and includes it in the exception message.

The new message form is as close as possible to the old form to avoid breaking compatibility with clients:

adamwynne commented 9 years ago

thanks for this