title: Best way to handle HTTP 429 errors
body: <p>I'm hitting an api that will return a 429, too many requests, response if you hit it more than 250 times in a five minute span. The count resets every five minutes so I've been handling like this:</p>
  
  <pre><code>try
  {
      return request.GetResponse();  
  }
  catch (Exception e)
  {
      if (e.Message.Contains("429"))
      {
          System.Threading.Thread.Sleep(5 * 60 * 1000);
          return request.GetResponse();
      }
      else
      {
          throw new Exception(e.Message);
      }
  }
  </code></pre>
  
  <p>Is this the correct way to handle this situation?</p>