lib/httpx/plugins/rate_limiter.rb in httpx-0.22.1 vs lib/httpx/plugins/rate_limiter.rb in httpx-0.22.2
- old
+ new
@@ -21,9 +21,11 @@
retry_on: method(:retry_on_rate_limited_response),
retry_after: method(:retry_after_rate_limit))
end
def retry_on_rate_limited_response(response)
+ return false unless response.is_a?(Response)
+
status = response.status
RATE_LIMIT_CODES.include?(status)
end