diff options
author | isaacs <i@izs.me> | 2011-10-20 07:09:01 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-10-20 07:09:01 +0400 |
commit | 11b848def1e37f1e11d20986cba577ffc3178513 (patch) | |
tree | 8ff1679745d6ba47325ca1b8e76260062e348755 /lib | |
parent | 248fb24f8ed04bc62402384fb7839a7ce5819983 (diff) |
Close #1571 Also check status code on 'error' results
Diffstat (limited to 'lib')
-rw-r--r-- | lib/utils/npm-registry-client/request.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/npm-registry-client/request.js b/lib/utils/npm-registry-client/request.js index c80114db8..1f021897b 100644 --- a/lib/utils/npm-registry-client/request.js +++ b/lib/utils/npm-registry-client/request.js @@ -169,7 +169,7 @@ function requestDone (method, where, cb) { return function (er, response, data) parsed._etag = response.headers.etag } - if (parsed && parsed.error) { + if (parsed && parsed.error && response.statusCode >= 400) { var w = url.parse(where).pathname.substr(1) if (parsed.error === "not_found") { w = w.split("/") |