Do not throw an Error embedding another Error

Should fix #68, but doesn't come with an automated test
remotes/origin/use_db_slaves
Sandro Santilli 12 years ago
parent 7d34cbbd63
commit 6b71cde56e

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

Loading…
Cancel
Save