If you want to handle the specific error, attach a .catch handler
models.Item.create({
title : req.body.title,
UserId : req.body.UserId
}).then(function(item){
res.json({
"Message" : "Created item.",
"Item" : item
});
}).catch(function (err) {
// handle error;
});
If you want to handle errors more generally (i.e. show a nice error message, instead of killing your server, you might want to have a look at unhandledexception
https://nodejs.org/api/process.html#process_event_uncaughtexception
If you are using express, it also contains some error handling facilities http://expressjs.com/en/guide/error-handling.html