Sequelize.js how to show error on create when using the .on("error") syntax? -


I am trying to explain how to pass the client due to the failure of creation.

I am using the recommended status code and I want to add details to the X-ray-ridge header. But when I use the "(") syntax, how do I pass the fault object in the callback function

thanks

  player.create ({name: Req.body.name, fname: req.body.fname, email: req.body.email,}). Console log ('player creation worked!'))) .on ('error', function (player1) {'success', function (player1) {res.status (201) .jsonp (player1) Res.header ("X-status-reason:", "Where's my err.description?"); Res.status (400) .jsonp (player1); console.log ('an error in player creation')})  

First error error codeback should be error , Player1

)

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -