Hey sorry your experiencing issues, could you provide the full code for the request being generated and a stack trace of the error or a full error response?
And this is the full error I get in the catch method:
SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at streamToValue (/XXX/node_modules/ipfs-http-client/src/utils/stream-to-json-value.js:25:18)
at concat (/XXX/node_modules/ipfs-http-client/src/utils/stream-to-value.js:12:22)
at ConcatStream.<anonymous> (/XXX/node_modules/concat-stream/index.js:32:43)
at ConcatStream.emit (events.js:187:15)
at finishMaybe (/XXX/node_modules/readable-stream/lib/_stream_writable.js:620:14)
at afterWrite (/XXX/node_modules/readable-stream/lib/_stream_writable.js:466:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
Logging the the data that is supposed to be JSON on line 25 of ipfs-http-client/src/utils/stream-to-json-value.js I get this:
<html>
<head><title>429 Too Many Requests</title></head>
<body bgcolor="white">
<center><h1>429 Too Many Requests</h1></center>
<hr><center>nginx</center>
</body>
</html>
I dont think I am making too many requests! And in fact all requests are failing, even the first. Hmmm…
To update, seems it is a problem of making too many requests (about 150) in parallel (as the error code does in fact indicate!). I am re-writing to make the requests sequentially and this seems to fix it. Thanks a lot for the help troubleshooting this @mike!