diff --git a/lib/storage.js b/lib/storage.js index 6a032482a..94df5b3f2 100644 --- a/lib/storage.js +++ b/lib/storage.js @@ -331,7 +331,14 @@ Storage.prototype.get_package = function(name, callback) { async.map(uplinks, function(up, cb) { up.get_package(name, function(err, up_res) { - if (err) return cb(); + if (err) { + if (up === self.local && (!err.status || err.status >= 500)) { + // report internal errors right away + return cb(err) + } else { + return cb() + } + } if (up === self.local) { // file exists in local repo