Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

addUser -force yield mongo error #21

Open
tkhduracell opened this issue Nov 19, 2016 · 1 comment
Open

addUser -force yield mongo error #21

tkhduracell opened this issue Nov 19, 2016 · 1 comment

Comments

@tkhduracell
Copy link

Running this multipel time fails...

Command

DB_URI=mongodb://strider:[email protected]:55747/strider-db 
/usr/bin/strider addUser -l [email protected] -p testtest -a -f

Gives error

Connecting to MongoDB URL: mongodb://strider:[email protected]:55747/strider-db

Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs.com/docs/promises.html
Error adding user: { [MongoError: E11000 duplicate key error index: strider-db.users.$email_1 dup key: { : "[email protected]" }]
  name: 'MongoError',
  message: 'E11000 duplicate key error index: strider-db.users.$email_1 dup key: { : "[email protected]" }',
  driver: true,
  code: 11000,
  index: 0,
  errmsg: 'E11000 duplicate key error index: strider-db.users.$email_1 dup key: { : "[email protected]" }',
  getOperation: [Function],
  toJSON: [Function],
  toString: [Function] }

Doc for -force flag

-f Force create user, existing users with the same email address get updated (flag) (default: false)

@tkhduracell
Copy link
Author

@kfatehi @knownasilya

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant