Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

307
Visualizações
DocumentDB updateOne fails with 163 Name is not valid for storage

I've seen issues with $ prefixed fields when writing into Mongo/Document DB, I still don't get what I'm missing.

writing into collections sessions works fine:

db.updateOne(
  { _id: '32c8529b-561f-413c-a6eb-daffbdf1b1e0_google-oauth2|666666666666666666666' },
  { '$set': { _id: '32c8529b-561f-413c-a6eb-daffbdf1b1e0_google-oauth2|666666666666666666666', value: {} } },
  { upsert: true }
)

however writing into collection data fails:

db.updateOne(
  { _id: 'google-oauth2|666666666666666666666' },
  { '$set': { _id: 'google-oauth2|666666666666666666666', value: { data: [Object], revision: 76 } } },
  { upsert: true }
)

With message: 163 MongoError Name is not valid for storage

Both collections have been implicitly created, there's no extra config.

I can only guess at this point that the data (which is a 200kb JSON) contains some key that results in this? there's no $ signs in that whole JSON and most of the keys are uuids.

Any idea what's broken here?

Thanks

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda