microsoft / TypeScript-Node-Starter

A reference example for TypeScript and Node with a detailed README describing how to use the two together.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Node] MongoError: E11000 duplicate key error collection

mozgbrasil opened this issue · comments

Good morning my friends

I would like to share that I tried to log in and this error came up.

Which returns the error "[Node] MongoError: E11000 duplicate key error collection: microsoft_typescript_node.users index: email_1 dup key: { email: "jondoe@gmail.com" }"

Then when accessing it worked again

I've done some simulations to create an account again but I couldn't get this error

I appreciate if you can help me

Looks like race condition from two instances of the application (say, we resubmiting login creation form twice)