Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2018-06-07 21:52:25 +0300
committerRebecca Turner <me@re-becca.org>2018-06-08 05:26:32 +0300
commitbdce96eb3c30fcff873aa3f1190e8ae4928d690b (patch)
treefe7eda73963f5af8fb1aab47bf3edab231e28fc6 /node_modules/npm-profile/index.js
parent0762ebb4105855393649db5a25a3e066cd858bc7 (diff)
npm-profile@3.0.2
Diffstat (limited to 'node_modules/npm-profile/index.js')
-rw-r--r--node_modules/npm-profile/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/node_modules/npm-profile/index.js b/node_modules/npm-profile/index.js
index f99b631e6..023ddae40 100644
--- a/node_modules/npm-profile/index.js
+++ b/node_modules/npm-profile/index.js
@@ -107,7 +107,7 @@ function webAuth (opener, conf, body) {
}
}
}).catch(er => {
- if (er.statusCode >= 400 && er.statusCode <= 499) {
+ if ((er.statusCode >= 400 && er.statusCode <= 499) || er.statusCode === 500) {
throw new WebLoginNotSupported('POST', target, {
status: er.statusCode,
headers: { raw: () => er.headers }
@@ -313,7 +313,7 @@ class HttpErrorAuthUnknown extends HttpErrorBase {
constructor (method, target, res, body) {
super(method, target, res, body)
this.message = 'Unable to authenticate, need: ' + res.headers.get('www-authenticate')
- this.code = 'EAUTHIP'
+ this.code = 'EAUTHUNKNOWN'
Error.captureStackTrace(this, HttpErrorAuthUnknown)
}
}