Skip to content

Commit 3fa264a

Browse files
committed
Fixed readFromDB error might cause excpection
1 parent debcfde commit 3fa264a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/db.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ function readFromDB(id, callback) {
8585
} else {
8686
//logger.info(result.rows);
8787
if (result.rows.length <= 0) {
88-
callback("not found note in db: " + util.inspect(id), null);
88+
callback("not found note in db", null);
89+
return logger.error("not found note in db: " + id, err);
8990
} else {
9091
if(config.debug)
9192
logger.info("read from db success");

0 commit comments

Comments
 (0)