Skip to content

Commit 010dfa0

Browse files
committed
Check for error response when fetching the rate limit
1 parent 0184c17 commit 010dfa0

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
@@ -116,6 +116,7 @@ impl GithubClient {
116116
.unwrap(),
117117
)
118118
.await?;
119+
rate_resp.error_for_status_ref()?;
119120
let rate_limit_response = rate_resp.json::<RateLimitResponse>().await?;
120121

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

0 commit comments

Comments
 (0)