Using the shopify-api-php library here.
It would appear that, at times, Shopify returns a malformed JSON that causes json_decode() to throw a JsonException (“Syntax error”).
I am now logging these occurrences so I will be attaching X-Request-ID(s), and the relative raw response, as soon as the issue presents itself again.
So far these occurrences have all been caused by InventoryLevel->set() calls.
This is a major nuisance cause the shopify-api-php library simply assumes that the JSON will always be correct hence when the JsonException is thrown our ERP cannot access the JSON hence cannot record locally the outcome of the operation.