adamwynne/twitter-api — pull request #59 by holguinj (2014-12-17 06:06:28+00:00)
Title: Include reset time in rate limit exception

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:

* old: `Twitter responded to request with error 88: Rate limit exceeded`
* new: `Twitter responded to request with error 88: Rate limit exceeded. Next reset at 123456 (UTC epoch seconds)`