Skip to content

Commit 79690e4

Browse files
Merge pull request #1694 from ehuss/rate-limit-error-check
Check for error response when fetching the rate limit
2 parents 744d644 + 010dfa0 commit 79690e4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/github.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ impl GithubClient {
124124
.unwrap(),
125125
)
126126
.await?;
127+
rate_resp.error_for_status_ref()?;
127128
let rate_limit_response = rate_resp.json::<RateLimitResponse>().await?;
128129

129130
// Check url for search path because github has different rate limits for the search api

0 commit comments

Comments
 (0)