Compare commits

...
1 Commits
Author SHA1 Message Date
Anurag 58d2ae6ebf fix: retryer fixed 2023-01-13 13:14:45 +05:30
+2 -1
View File
@@ -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