Skip to content

Commit 8d9be13

Browse files
author
Alexey Malihin
committed
Adding logging in console if something goes wrong
Could be useful, when you are connected to mongoDb, but have no right to write in it. Console log will return correct error instead of 'Error: timeout'.
1 parent 84e78b3 commit 8d9be13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ var setBubble = function(req, res){
4343

4444
bubble.save(function (err, data) {
4545
if (!err){
46+
console.log(arguments);
4647
res.jsonp(data);
4748
}
4849
});
@@ -82,4 +83,4 @@ global.app.get('/getBubbles', getBubbles);
8283
global.app.get('/setBubble', setBubble);
8384
global.app.get('/removeBubble', removeBubble);
8485
global.app.get('/countBubbles', countBubbles);
85-
global.app.get('/removeAllBubbles', removeAllBubbles);
86+
global.app.get('/removeAllBubbles', removeAllBubbles);

0 commit comments

Comments
 (0)