For Workers & Pages, what is the name of the domain?
none
What is the error number?
42003
What is the error message?
vectorize.upstream_error - failed to parse upsert vectors request in ndjson format: line Some(0) was not expected format"
What is the issue or error you’re encountering
am trying to upsert a vector in my cloudflare vectorize index For now I am testing from my terminal using cURL Call I am making is this: curl -v --request POST --url https://api.cloudflare.com/client/v4/accounts/my_account_id/vectorize/v2/indexes/c1-vectorize/upsert --header ‘Authorization: Bearer redacted’ --header ‘Content-Type: application/x-ndjson’ --data @vector-data-clean-utf8.ndjson Here is what the vector-data-clean-utf8.ndjson file looks like: {“id”:“s4444”,“values”:[175.1, 167.1, 129.9],“metadata”:{“url”:“/products/sku/918318313”}} {“id”:“5555”,“values”:[158.8, 116.7, 311.4],“metadata”:{“url”:“/products/sku/183183183”}} {“id”:“6666”,“values”:[113.2, 67.5, 11.2],“metadata”:{“url”:“/products/sku/717313811”}} This is exactly what the example ndjson file on the vectorize page of cloudflare page is. Yet, no matter what variation I try, I get this error: “errors”: [ { “code”: 40023, “message”: “vectorize.upstream_error - failed to parse upsert vectors request in ndjson format: line Some(0) was not expected format” } ] The error does not provide any more details that this, so I am trying to understand how to overcome this. Any help is appreciated as I could not find much help with this problem.
What steps have you taken to resolve the issue?
Cleaned the file for spaces , trimmed it Ensured no newline at the end of file or beginning of file Checked the type of the file, changed it to utf-8 from us-ascii Tried using a normal JSON file, no luck either
What are the steps to reproduce the issue?
curl -v --request POST --url https://api.cloudflare.com/client/v4/accounts/my_account_id/vectorize/v2/indexes/c1-vectorize/upsert --header ‘Authorization: Bearer redacted’ --header ‘Content-Type: application/x-ndjson’ --data @vector-data-clean-utf8.ndjson
use any ndjson file