Skip to content

Commit

Permalink
refactor: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
rickstaa committed Jan 16, 2023
1 parent c8418b4 commit dcf31bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common/retryer.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +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.";
const isAccountSuspended =
err.response.data &&
err.response.data.message === "Sorry. Your account was suspended.";

if (isBadCredential || isAccountSuspended) {
logger.log(`PAT_${retries + 1} Failed`);
Expand Down

0 comments on commit dcf31bb

Please sign in to comment.