How to Update MongoDB Document without Error Message?

This topic was automatically generated from Slack. You can find the original thread here.

Hello everyone! I’m trying to update a MongoDB document but this message is appearing. What am I doing wrong? Thanks!

Hi Victoria, Thanks for reaching out. Happy to help!

Can you please provide the configuration of your MongoDb Update Document step?

The error message is helpful, but without knowing the props you’ve defined it’s hard to tell what the issue could be.

Hi Pierce, sure!
This is the first part

for the document I fill the field with a variable I get from the previous step

in the prev step I find the doc and I use the id to update the doc

I think the _id field in particular is what the issue is. The underlying action is missing the new prefix to the constructor:

Could you open a bug report and tag me? @ctrlaltdylan I can describe this bug to the developers:

But in the meantime, you can use the Use any MongoDb API with Node.js to scaffold a Node.js version of this step and write the query

Ok! I’m opening the report. Thanks for your help!