In the past, I've seen this error pop up due to multi-threaded operations - if you're running multiple apps or operations using the same Shopify API credentials, that could potentially cause this. Or if you've set up too many sequenced calls (let's say for large bulk inventory imports).
Generally, I'd recommend first setting up a system to retry a failed request if you are making too many calls and hitting an error if you haven't done so already. There is a certain level of expectation that some calls will have a marginal rate of odd responses like this, but setting up a way to automatically retry the call on failure can help us determine if the issue is persisting.
I'm not a developer myself and my knowledge mainly lies around our APIs themselves, so I can't offer a solution as to how to implement the solution programatically, but I hope this helped provide some next steps.