Context: This is C++ code running on VM "wdc" in Toolforge Cloud project "wdq-mm", using the CURL library.
I am querying the Wikidata API from that code, example URL: https://www.wikidata.org/w/api.php?format=json&action=query&meta=siteinfo&siprop=general
Mostly, it works. Sometimes, it returns HTML instead of the specified JSON, more specifically, the API manual, as though I had not used any parameters. Repeatedly querying that URL, even with adding random parameters, results in the same HTML. This will be true for a minute or so, suggesting it's a specific server/cache that the load balancer gives me, then forgets about me.
The last line of the returned HTML seems to be the most helpful for debugging: