소스 검색

Check for error response when fetching the rate limit

Eric Huss 1 년 전
부모
커밋
010dfa031b
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/github.rs

+ 1 - 0
src/github.rs

@@ -116,6 +116,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