diff options
author | Wu Cheng-Han | 2015-07-16 08:47:33 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2015-07-16 08:47:33 +0800 |
commit | 57253d28a7ad2037ba4d5da69d69f653e651c49b (patch) | |
tree | 9b00711e35164654d9704c9e0e97f37c833daad8 | |
parent | 4e61728a6a05156ae7e18cfb2ccc74bcf1fc4825 (diff) |
Using util.inspect instead of JSON.stringify to avoid "TypeError: Converting circular structure to JSON"
Diffstat (limited to '')
-rw-r--r-- | lib/db.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -85,7 +85,7 @@ function readFromDB(id, callback) { } else { //logger.info(result.rows); if (result.rows.length <= 0) { - callback("not found note in db: " + JSON.stringify(id), null); + callback("not found note in db: " + util.inspect(id), null); } else { if(config.debug) logger.info("read from db success"); |