Skip to content

Commit

Permalink
fix: retryer fixed (anuraghazra#2400)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraghazra authored and DPS0340 committed Mar 2, 2023
1 parent 7816eec commit 176d9cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/common/retryer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 176d9cd

Please sign in to comment.