We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64efa3c commit 208e40aCopy full SHA for 208e40a
src/util/request-manager.js
@@ -433,11 +433,9 @@ export default class RequestManager {
433
}
434
435
436
- const server = res.caseless.get('server');
437
-
438
- if (res.statusCode === 401 && server === 'GitHub.com') {
+ if (res.statusCode === 401 && res.caseless && res.caseless.get('server') === 'GitHub.com') {
439
const message = `${res.body.message}. If using GITHUB_TOKEN in your env, check that it is valid.`;
440
- rejectWithoutUrl(new Error(this.reporter.lang('unauthorizedResponse', server, message)));
+ rejectWithoutUrl(new Error(this.reporter.lang('unauthorizedResponse', res.caseless.get('server'), message)));
441
442
443
if (res.statusCode === 401 && res.headers['www-authenticate']) {
0 commit comments