mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
fix(github): detect rate limit correctly
This commit is contained in:
parent
8ffd29ea19
commit
2bb97240f1
2 changed files with 2 additions and 2 deletions
|
@ -139,7 +139,7 @@ async function get(path, options, retries = 5) {
|
||||||
},
|
},
|
||||||
'Bad credentials'
|
'Bad credentials'
|
||||||
);
|
);
|
||||||
if (rateLimit === 60) {
|
if (rateLimit === '60') {
|
||||||
throw new Error('platform-failure');
|
throw new Error('platform-failure');
|
||||||
}
|
}
|
||||||
throw new Error('bad-credentials');
|
throw new Error('bad-credentials');
|
||||||
|
|
|
@ -96,7 +96,7 @@ describe('platform/gh-got-wrapper', () => {
|
||||||
statusCode: 401,
|
statusCode: 401,
|
||||||
message: 'Bad credentials. (401)',
|
message: 'Bad credentials. (401)',
|
||||||
headers: {
|
headers: {
|
||||||
'x-ratelimit-limit': 60,
|
'x-ratelimit-limit': '60',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue