Skip to content

Commit f2d718a

Browse files
anuraghazrarickstaa
authored andcommitted
fix: retryer fixed (#2400)
1 parent e3a4c62 commit f2d718a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/common/retryer.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ const retryer = async (fetcher, variables, retries = 0) => {
4545
// prettier-ignore
4646
// also checking for bad credentials if any tokens gets invalidated
4747
const isBadCredential = err.response.data && err.response.data.message === "Bad credentials";
48+
const isAccountSuspended = err.response.data && err.response.data.message === "Sorry. Your account was suspended.";
4849

49-
if (isBadCredential) {
50+
if (isBadCredential || isAccountSuspended) {
5051
logger.log(`PAT_${retries + 1} Failed`);
5152
retries++;
5253
// directly return from the function

0 commit comments

Comments
 (0)