Giter Site home page Giter Site logo

Comments (7)

icebob avatar icebob commented on May 18, 2024 1

Nice, could you create a PR with fix?

from vue-express-mongo-boilerplate.

jfmmm avatar jfmmm commented on May 18, 2024

Doesn't seem to happen in your live demo, maybe it's because I don't have a mailer transport configured yet.

from vue-express-mongo-boilerplate.

icebob avatar icebob commented on May 18, 2024

What kind of version of MongoDB are you using?
Because the account.js:151 this:

let field = err.message.split(".$")[1];
field = field.split(" dup key")[0];

So the err.message should contain '.$' string, but yours is not.

Your Mongo's error message:

'E11000 duplicate key error collection: boilerplate-dev.users index: email_1 dup key: { : "[email protected]" }',

my message (on live demo):

'E11000 duplicate key error index: vemapp.users.$email_1  dup key: { : "[email protected]" }'

from vue-express-mongo-boilerplate.

jfmmm avatar jfmmm commented on May 18, 2024

a fresh install of the last version (3.4.1) on windows 10.
the Windows Server 2008 R2 64-bit and later, without SSL support x64 version.

from vue-express-mongo-boilerplate.

av8ta avatar av8ta commented on May 18, 2024

I have the same problem. Changed the above two lines to this:

let field;
if(err.message.includes(".$")) {
  field = err.message.split(".$")[1];
}
else if (err.message.includes("index: ")) {
  field = err.message.split("index: ")[1];
}
else {
  req.flash("error", { msg: req.t("UserSaveError") });
  done(err, user);
  return
}

Ugly, but it's working :)

from vue-express-mongo-boilerplate.

av8ta avatar av8ta commented on May 18, 2024

Sweet. Done :)

from vue-express-mongo-boilerplate.

icebob avatar icebob commented on May 18, 2024

👍

from vue-express-mongo-boilerplate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.