diff options
author | Rebecca Turner <me@re-becca.org> | 2018-06-07 21:52:25 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2018-06-08 05:26:32 +0300 |
commit | bdce96eb3c30fcff873aa3f1190e8ae4928d690b (patch) | |
tree | fe7eda73963f5af8fb1aab47bf3edab231e28fc6 /node_modules/npm-profile/index.js | |
parent | 0762ebb4105855393649db5a25a3e066cd858bc7 (diff) |
npm-profile@3.0.2
Diffstat (limited to 'node_modules/npm-profile/index.js')
-rw-r--r-- | node_modules/npm-profile/index.js | 4 |
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) } } |