Skip to content

Commit

Permalink
set correct result for rate limiting from search/trends API
Browse files Browse the repository at this point in the history
  • Loading branch information
paulduran committed Apr 13, 2012
1 parent 0bc3baf commit 9728624
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Twitterizer2/Core/TwitterCommand.cs
Expand Up @@ -321,6 +321,10 @@ private static void SetStatusCode(TwitterResponse<T> twitterResponse, HttpStatus
twitterResponse.Result = (rateLimiting != null && rateLimiting.Remaining == 0) ? RequestResult.RateLimited : RequestResult.BadRequest;
break;

case (HttpStatusCode)420: //Rate Limited from Search/Trends API
twitterResponse.Result = RequestResult.RateLimited;
break;

case HttpStatusCode.Unauthorized:
twitterResponse.Result = RequestResult.Unauthorized;
break;
Expand Down

0 comments on commit 9728624

Please sign in to comment.