Closed lishanl closed 11 months ago
Wait, so you are handling this in the GraphQL but what about Rest?
rest has a broader retry covereage.
https://github.com/SatelCreative/spylib/blob/73815ff5c06ecba5dc0e6bfb88085a4294bbd1b6/spylib/exceptions.py#L62-L67 https://github.com/SatelCreative/spylib/blob/73815ff5c06ecba5dc0e6bfb88085a4294bbd1b6/spylib/admin_api.py#L125-L131 https://github.com/SatelCreative/spylib/blob/73815ff5c06ecba5dc0e6bfb88085a4294bbd1b6/spylib/admin_api.py#L154-L156
When Shopify GQL API returns 503 Service Unavailable, the content of the response is not JSON.
The error being raise from AprilAire is
Add retry to intermittent errors for 500 and 503 error codes Add a try block for the json parsing to throw a more informative error for non 200 returns