Shopify returns Retry-After header as a float. So when we run usleep($retryAfter * 1000000); on Clients/Http.phpLine 204 it throws a TypeError Exception as seen here:
TypeError: usleep(): Argument #1 ($microseconds) must be of type int, float given in /home/user/project/vendor/shopify/shopify-api/src/Clients/Http.php:204
Expected behavior
Instead of throw an exception it should work and delays the program's execution for given microseconds.
Actual behavior
What actually happens?
Throws a TypeError Exception as seen here:
TypeError: usleep(): Argument #1 ($microseconds) must be of type int, float given in /home/user/project/vendor/shopify/shopify-api/src/Clients/Http.php:204
Steps to reproduce the problem
Throttle the api above your rate limit and you will encounter with TypeError Exception.
Checklist
[x] I have described this issue in a way that is actionable (if possible)
Issue summary
Shopify returns
Retry-After
header as a float. So when we runusleep($retryAfter * 1000000);
onClients/Http.php
Line 204 it throws a TypeError Exception as seen here:TypeError: usleep(): Argument #1 ($microseconds) must be of type int, float given in /home/user/project/vendor/shopify/shopify-api/src/Clients/Http.php:204
Expected behavior
Instead of throw an exception it should work and delays the program's execution for given microseconds.
Actual behavior
What actually happens?
Throws a TypeError Exception as seen here:
TypeError: usleep(): Argument #1 ($microseconds) must be of type int, float given in /home/user/project/vendor/shopify/shopify-api/src/Clients/Http.php:204
Steps to reproduce the problem
Checklist