Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

306
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!