Skip to content

Commit

Permalink
Merge pull request #1019 from clement911/master
Browse files Browse the repository at this point in the history
Protect again case where rate limit header is not available.
  • Loading branch information
clement911 authored Feb 18, 2024
2 parents 7d8e3d4 + e01f23d commit 3f722c7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class RestBucketState

public static RestBucketState Get(HttpResponseHeaders responseHeaders)
{
string headerValue = responseHeaders.GetValues(RESPONSE_HEADER_API_CALL_LIMIT)?.FirstOrDefault();
string headerValue = responseHeaders.TryGetValues(RESPONSE_HEADER_API_CALL_LIMIT, out var values) ? values?.FirstOrDefault() : null;

if (headerValue == null)
return null;
Expand Down

0 comments on commit 3f722c7

Please sign in to comment.