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);