Today I started to see fetch failed
from the ECONNRESET
read exception when using (native) fetch
in Node.js v18 and v20. Without changes on my end. Tried to re-install dependencies, upgrade to the latest versions of Node.js, reboot macOS, etc. to no avail.
The same error also occurs in Node.js v16 when using a fetch
polyfill which uses the native https.request
method under the hood.
Requests keep failing consistently. Trying the /query
and /vectors/delete
endpoints.
The controller endpoint (https://controller.${environment}.pinecone.io/databases
) works fine.
Making the same requests to the same url’s from browser or with curl work fine.
I’m on the free plan.
Example code (using the same code in the browser works fine):
const response = await fetch(`https://[redacted].svc.[redacted].pinecone.io/query`, {
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
'Api-Key': token
},
method: 'POST',
body: JSON.stringify({ ...defaults, vector, namespace })
});
Curious as to why this could happen. If anybody has a clue I’m all ears!