diff options
author | myk bilokonsky <mbilokonsky@gmail.com> | 2017-04-15 15:25:53 +0200 |
---|---|---|
committer | myk bilokonsky <mbilokonsky@gmail.com> | 2017-04-15 15:25:53 +0200 |
commit | 6344ee26da9d234801cec21bd6d4d76e370e1b5d (patch) | |
tree | 15e1c2517cae8f1f97ad443ee310b37ce240317a /index.js | |
parent | 9a2aa586104a0d5ed37de9ad412c49f18a59c742 (diff) |
errors
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/index.js b/index.js index 1ef0760..ecb2a00 100644 --- a/index.js +++ b/index.js @@ -43,16 +43,19 @@ var client = new pg.Client(config); function cycle() { client.connect(function (err) { if (err) { - return console.error('error connecting to client', err.message); + console.error('error connecting to client'); + return console.dir(err); } client.query(query, [], function (err, result) { if(err) { - return console.error('error running query', err.message); + console.error('error running query'); + return console.dir(err); } client.end(function (err) { - console.error('error disconnecting from client', err.message); + console.error('error disconnecting from client'); + console.dir(err); }); boost(result.rows); @@ -106,7 +109,7 @@ function boost(rows) { return console.log('Warning: tried to boost #' + row.id + ' but it had already been boosted by this account. Adding to cache.'); } - return console.log(err.message); + return console.log(err); } boosted.set(row); console.log('boosted status #' + row.id); |