mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-05-19 13:26:18 +00:00
fix: retryer fixed (#2400)
This commit is contained in:
@@ -45,8 +45,9 @@ const retryer = async (fetcher, variables, retries = 0) => {
|
||||
// prettier-ignore
|
||||
// also checking for bad credentials if any tokens gets invalidated
|
||||
const isBadCredential = err.response.data && err.response.data.message === "Bad credentials";
|
||||
const isAccountSuspended = err.response.data && err.response.data.message === "Sorry. Your account was suspended.";
|
||||
|
||||
if (isBadCredential) {
|
||||
if (isBadCredential || isAccountSuspended) {
|
||||
logger.log(`PAT_${retries + 1} Failed`);
|
||||
retries++;
|
||||
// directly return from the function
|
||||
|
||||
Reference in New Issue
Block a user