You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
max_retries=0 raises ValueError on every request #1139
ApifyClient(max_retries=0) is accepted (_apify_client.py#L122, #L143), but every call then fails with ValueError('max_retries must be at least 1, got 0') from the retry loop (_base.py#L594-L624, async at #L821-L851). The loop makes max_retries attempts and then one more, so max_retries counts retries and 0 would mean a single attempt. As it stands, there is no way to turn retries off.
The JS client accepts any non-negative integer (base.ts#L57) and uses the same attempt loop (base.ts#L515-L534).
Expected behavior
max_retries=0 makes one attempt with no retries. A negative value is rejected in the constructor, not on the first request.
Activity
fix: allow `max_retries=0` to disable retries (#1142)