sequelize-auto icon indicating copy to clipboard operation
sequelize-auto copied to clipboard

allow catching errors from SequelizeAuto.run()

Open hallelk opened this issue 1 year ago • 0 comments

I've been using SequelizeAuto in a CLI, and I'm getting a connection error printed every once in a while but it is not thrown as an error.

try {  
   var auto = new SequelizeAuto(config.db_name, config.user, config.password, config);  
   await auto.run().catch(err => {throw "failed generating model"});  
} catch(err) {  
   // never gets here, even when I see an error printed  
}  

hallelk avatar Apr 11 '23 10:04 hallelk