Преглед изворни кода

Merge pull request #1694 from ehuss/rate-limit-error-check

Check for error response when fetching the rate limit
Mark Rousskov пре 1 година
родитељ
комит
79690e4dc0
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      src/github.rs

+ 1 - 0
src/github.rs

@@ -124,6 +124,7 @@ impl GithubClient {
                         .unwrap(),
                 )
                 .await?;
+            rate_resp.error_for_status_ref()?;
             let rate_limit_response = rate_resp.json::<RateLimitResponse>().await?;
 
             // Check url for search path because github has different rate limits for the search api