From 8d4f033a562bd08da4486d2b1192c56e84e5b7c4 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 28 Jan 2013 17:39:50 +0100 Subject: [PATCH] Revert "getDatabase: properly handle redis connection failures" This reverts commit dd19d741497adf65dabe719ae9f2545db456044b. The code was already correct --- lib/cartodb/carto_data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cartodb/carto_data.js b/lib/cartodb/carto_data.js index 9c7a8d0f..83b9933b 100644 --- a/lib/cartodb/carto_data.js +++ b/lib/cartodb/carto_data.js @@ -35,7 +35,7 @@ module.exports = function() { var redisKey = _.template(this.user_key, {username: username}); this.retrieve(this.user_metadata_db, redisKey, 'database_name', function(err, dbname) { - if ( err ) { callback(err, null); return; } + if ( err ) callback(err, null); else if ( dbname === null ) { callback(new Error("missing " + username + "'s dbname in redis (try CARTODB/script/restore_redis)"), null); }