#Hey I have this weird bug:`payload.create` is ret...

3 messages · Page 1 of 1 (latest)

quick inletBOT
#

Hey I have this weird bug:
payload.create is returning this error:

{
    "error": {
        "index": 0,
        "code": 11000,
        "keyPattern": {
            "username": 1
        },
        "keyValue": {
            "username": null
        }
    }
}

This should happen when there is a conflict between two unique fields. But in my case I have removed the field "username" which was unique. I don't understand where it is getting the "username" from?

Original message from @reef rapids - Moved from #general message (in #general)

reef rapids
#

The problem was that Indexes inside MongoDB don't get updated when a collection is removed/updated.