@ctil/gql 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1611,6 +1611,7 @@ var CCRequest = class {
1611
1611
  console.error("Failed to persist login info to file:", err);
1612
1612
  }
1613
1613
  }
1614
+ this.config.loginInfo = loginInfo;
1614
1615
  }
1615
1616
  /** 加载登录信息(仅负责加载,不负责刷新) */
1616
1617
  /** 加载登录信息 */
@@ -1687,6 +1688,7 @@ var CCRequest = class {
1687
1688
  this.removeLoginInfo();
1688
1689
  throw new Error("Login expired. Please login again.");
1689
1690
  }
1691
+ console.log("refreshExpired", refreshExpired);
1690
1692
  if (accessExpired && !refreshExpired) {
1691
1693
  try {
1692
1694
  const refreshResult = await auth.refreshToken({
@@ -1696,9 +1698,10 @@ var CCRequest = class {
1696
1698
  });
1697
1699
  const newInfo = refreshResult.refreshToken ?? refreshResult;
1698
1700
  this.setLoginInfo(newInfo, this._remember);
1699
- } catch {
1701
+ } catch (err) {
1702
+ console.log("err", err);
1700
1703
  this.removeLoginInfo();
1701
- throw new Error("Failed to refresh token. Please login again.");
1704
+ throw new Error("Failed to refresh token. Please login again." + err?.message);
1702
1705
  }
1703
1706
  }
1704
1707
  }