Exception on upsert

when I call upsert on the index with bunch of vectors and metadata I get:

System.Net.Http.HttpRequestException: 'Upsert request has failed. Code: BadRequest. Message: {"code":3,"message":"not supported value type","details":[]}'

My code is here:

               try
                {
                    mIndex = idx;
                    List<Vector> vectors = new List<Vector>();

                    for (int i = 0; i < entityList.Count; i++)
                    {
                        Vector vec = new Vector()
                        {
                            Id = i.ToString(),
                            Values = entityList[i].EmbeddingsVector,
                            Metadata = new MetadataMap()
                        };

                        if (!String.IsNullOrEmpty(entityList[i].Text))
                        {
                            vec.Metadata.Add("ID", entityList[i].EntityId);
                            vec.Metadata.Add("Text", entityList[i].Text);
                            vec.Metadata.Add("Source", entityList[i].Source);
                            vec.Metadata.Add("URL", entityList[i].URL);
                            vec.Metadata.Add("Start", entityList[i].Start);
                            vec.Metadata.Add("End", entityList[i].End);
                        }

                        vectors.Add(vec);
                    }

                    await mIndex.Upsert(vectors);

                    Log.VerboseFormat("Successfully ingested {0} vectors into Index: {1}", vectors.Count, mIndex.Details.Name);
                }
                catch (Exception ex)
                {
                    Log.Verbose(ex);
                }

I eliminated adding any pairs to Metadata that did not have defined values. So if its a string value pair that has empty string, then do not add it to Metadata dictionary. If it is int and it is not defined then either set it to impossible value (from the business logic point of view) or do not add it to metadata dictionry.