1 parent 04ceeb1 commit 5b4f66bCopy full SHA for 5b4f66b
1 file changed
shopify_app/graphql/admin_graphql.py
@@ -395,7 +395,11 @@ def _handle_429_retry_sync(
395
res=res,
396
)
397
398
- time.sleep(int(retry_after))
+ try:
399
+ delay = float(retry_after)
400
+ except (TypeError, ValueError):
401
+ delay = 1.0
402
+ time.sleep(delay)
403
return (True, False, None)
404
405
if status_code == 429 and attempt == max_retries:
@@ -451,7 +455,11 @@ async def _handle_429_retry_async(
451
455
452
456
453
457
454
- await asyncio.sleep(int(retry_after))
458
459
460
461
462
+ await asyncio.sleep(delay)
463
464
465
0 commit comments