Fixed readFromDB error might cause excpection
This commit is contained in:
parent
debcfdef14
commit
3fa264a43a
1 changed files with 2 additions and 1 deletions
|
@ -85,7 +85,8 @@ function readFromDB(id, callback) {
|
||||||
} else {
|
} else {
|
||||||
//logger.info(result.rows);
|
//logger.info(result.rows);
|
||||||
if (result.rows.length <= 0) {
|
if (result.rows.length <= 0) {
|
||||||
callback("not found note in db: " + util.inspect(id), null);
|
callback("not found note in db", null);
|
||||||
|
return logger.error("not found note in db: " + id, err);
|
||||||
} else {
|
} else {
|
||||||
if(config.debug)
|
if(config.debug)
|
||||||
logger.info("read from db success");
|
logger.info("read from db success");
|
||||||
|
|
Loading…
Reference in a new issue