From 57253d28a7ad2037ba4d5da69d69f653e651c49b Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Thu, 16 Jul 2015 08:47:33 +0800 Subject: Using util.inspect instead of JSON.stringify to avoid "TypeError: Converting circular structure to JSON" --- lib/db.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/db.js') diff --git a/lib/db.js b/lib/db.js index c62be7a4..4c51c291 100644 --- a/lib/db.js +++ b/lib/db.js @@ -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"); -- cgit v1.2.3