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

Commit 389bb8df by Jan Aagaard Meier

Convert the adapter error to an actual js error in authenticate

1 parent 9369ba9e
Showing with 3 additions and 1 deletions
...@@ -593,7 +593,9 @@ module.exports = (function() { ...@@ -593,7 +593,9 @@ module.exports = (function() {
* @return {Promise} * @return {Promise}
*/ */
Sequelize.prototype.authenticate = function() { Sequelize.prototype.authenticate = function() {
return this.query('SELECT 1+1 AS result', null, { raw: true, plain: true }).return() return this.query('SELECT 1+1 AS result', null, { raw: true, plain: true }).return().catch(function (err) {
throw new Error(err)
})
} }
Sequelize.prototype.validate = Sequelize.prototype.authenticate; Sequelize.prototype.validate = Sequelize.prototype.authenticate;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!