I got an internal error response when I call GraphQL API to create product.
This is the request id: b49530aa-cbfa-425c-8008-8c592fcbc19e
The error occurred at 2021-07-27T10:55:13.096+07:00.
Thanks for raising this! I took a look at that request ID and the request timed out due to exceeding the time allocated to the request for the last (seventh) image that were being passed into the input on productCreate.
It was this image - product-preview/1598331885217583/1598331885744.jpg
We'd recommend to try a different image or alternatively optimising this image. Let me know if you still have issues - thanks!
Hi @L_J_K ,
Can you point out what's the problem with this image. It's just 200KB in size and I can upload it successfully when creating product in my store using Shopify GUI. I need to know the issue in order to optimize it and similar images in future!
The logs wouldn't have that level of granularity to give an indication of what was wrong with the image unfortunately, we'd just see the timeouts generally.
That said, I do note the image src is sourced from a third party domain though and from the logs, it looks like that 7th image was simply timing out at the time when trying to establish a connection to the image source host. Not sure if it was some transient issue at the host end at the time.
To explain a little more, Shopify sets a timeout period of 2 seconds when trying to connect to the Image src host.
I'm actually able to successfully post using that particular images same src url over the API without a timeout in test, so it perhaps this looks to be a temporary thing.
Hope this clarifies further - you may have considered this already but base 64 encoding the images could be a consideration. Thanks!