From 10457418fef0b9dcc3881a081c20d1a16576e738 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 21 Jan 2011 19:16:00 +0100 Subject: fixed error message, if no db connection is available --- src/nodejs/no1.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nodejs/no1.js b/src/nodejs/no1.js index 631b92c..7895cff 100644 --- a/src/nodejs/no1.js +++ b/src/nodejs/no1.js @@ -119,8 +119,8 @@ function connectionError(err, res) { function db_connect(res, callback) { pg.connect(connectionString, function(err, client) { if(err) { - log.error('message'); - res.writeHead(404,{}); + log.error(err.message); + res.writeHead(500,{}); res.end(); } else { log.info("db connection was successfull"); -- cgit v1.2.3