From 6b71cde56eb6e5feaa822bc5dabfb603100cdf47 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Fri, 8 Feb 2013 12:27:49 +0100 Subject: [PATCH] Do not throw an Error embedding another Error Should fix #68, but doesn't come with an automated test --- 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 9c9b03f4..dc2c71ea 100644 --- a/lib/cartodb/carto_data.js +++ b/lib/cartodb/carto_data.js @@ -106,7 +106,7 @@ module.exports = function() { if (check_result === 1) { // authorized by key, login as db owner that.getId(req, function(err, user_id) { - if (err) throw new Error(err); + if (err) throw err; var dbuser = _.template(global.settings.postgres_auth_user, {user_id: user_id}); _.extend(req, {dbuser:dbuser}); callback(err, true);