CSRF-X Auth Library - v1.0.3
    Preparing search index...

    Function isRetryableError

    • Determines if an error is safe to retry.

      Parameters

      • error: AuthError

        The AuthError instance to evaluate.

      Returns boolean

      true if the error indicates a transient condition (network, timeout,
      server error, or rate limiting), otherwise false.

      Retryable errors are those that may succeed on a subsequent attempt without
      changing the request or credentials. Non‑retryable errors (e.g., invalid
      credentials, CSRF expired) require user intervention or state reset.

      try {
      await auth.login();
      } catch (err) {
      if (isRetryableError(err)) {
      await delay(1000);
      return auth.login();
      }
      throw err;
      }

      @public

      0.1.1