postgresql - ' "length": 147, "severity": "ERROR" ' error while using pg and node.js -
i using node.js , postgresql. on local can create records admin on production getting following error:
{ "name": "error", "length": 147, "severity": "error"
i unable find reason same.
i calling following api saving records:
savetopic = function (req, res) { logsinconsole(req); db.topic .create({ topic_name: req.body.topic_name, topic_category: req.body.topic_category }) .success(function(result){ res.redirect('/topics'); }).error(function(error){ res.send('failed save topic. went wrong. here error: '); res.send(error); }); };
so when try create record, redirects '/savetopic'
url can see error.
any appreciated.thanks
there duplicate primary key issue due records manually inserted in beginning on server. emptied table , reinserted records , works fine now. guys. hope helps someone.
Comments
Post a Comment