sequelize/sequelize — pull request #2735 by ivasilov (2014-12-14 15:52:15+00:00)
Title: Added test for formatError.

I've run into this problem while trying to use a string with a newline for unique key. It tries to save to MySql and fails, but when Sequelize tries to parse the error and throw a UniqueConstraintError, it fails because the regex is not taking the newline into consideration.

I've attached a test which demonstrates this bug.