不要怂,就是干,撸起袖子干!

Commit 36d46c03 by Jan Aagaard Meier

Merge pull request #2575 from overlookmotel/Fix-unique-constraint-parsing-bug

Fix MySQL unique constraint error message parsing
2 parents cd145d24 155bffc0
Showing with 1 additions and 1 deletions
......@@ -53,7 +53,7 @@ module.exports = (function() {
switch (err.errno || err.code) {
case 1062:
match = err.message.match(/Duplicate entry '(.*)' for key '?(.*?)$/);
match = err.message.match(/Duplicate entry '(.*)' for key '?(.*?)'?$/);
return new sequelizeErrors.UniqueConstraintError({
fields: null,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!