I'm getting bad request exception

I’m getting the following error when I try to vectorize the text.
pinecone.core.client.exceptions.ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({‘content-type’: ‘text/plain’, ‘content-length’: ‘80’, ‘date’: ‘Mon, 10 Jul 2023 04:16:52 GMT’, ‘server’: ‘envoy’, ‘connection’: ‘close’})
HTTP response body: Unexpected token. 2b898b", “values”: [NaN], “metadata”: {"

Hi @kaushal,

Thanks for your question, and I’m sorry you’re encountering this issue.

To better help you, please share the relevant parts of your application code making the call.

It also looks like the values you’re passing to the Pinecone API call may be an array of JavaScript’s not a number (NaN) object - if I’m reading the text you pasted correctly.

HTTP Status code 400 also suggests that the Pinecone API found your request to be malformed or containing incorrect data, which would gel with the [NaN] shown in the values field.

Could you try printing out the vectors you’re passing to Pinecone before the call to upsert or query them? That might help better diagnose whether the issue is within your application code.

I hope that helps!