We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d92875a commit e13f444Copy full SHA for e13f444
errors/http_error_handling.go
@@ -163,6 +163,10 @@ func IsNonRetryableStatusCode(resp *http.Response) bool {
163
164
// IsRateLimitError checks if the provided response indicates a rate limit error.
165
func IsRateLimitError(resp *http.Response) bool {
166
+ if resp == nil {
167
+ // If the response is nil, it cannot be a rate limit error.
168
+ return false
169
+ }
170
return resp.StatusCode == http.StatusTooManyRequests
171
}
172
0 commit comments