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 J00MZ committed Jan 13, 2023
1 parent ec1284f commit 7e9fabf
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

1 comment on commit 7e9fabf

@vercel
Copy link

@vercel vercel bot commented on 7e9fabf Jan 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.