sequelize.js - How to Handle Errors When Using the .create(...) Method in Sequelize -


hi sequelize experts!

i ask, how handle errors when using method .create(...). found posts both in documentation , in stackoverflow on how handle errors .build() , findorcreate() methods not create() method.

comments highly appreciated.

note: using sequelize v3.1.0 , tedious v1.11.0.

all async actions in sequelize returns promise

a promise object mehods invoked, based on whether async action succeeded or not

model.create/findorcreate/update/whatever.then(function () {   // invoked on success }).catch(function () {   // invoked on failure }); 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -