Hiyve Components - v1.0.0
    Preparing search index...
    • True when an error says the credential it was sent with is dead: HTTP 401 (rejected) or 410 (expired). Reads status, statusCode, or an HTTP error! status: NNN message, and follows the cause chain, because a failed recovery carries the failure that triggered it as its cause.

      Use it to decide that retrying is pointless until a new token exists. A 403 (valid credential, forbidden operation) and a 5xx are NOT auth failures and are worth retrying.

      Parameters

      • err: unknown

      Returns boolean

      try {
      await client.modifyFile({ file, fileId });
      } catch (err) {
      if (isAuthFailureError(err)) stopAutosave(); // needs a sign-in, not a timer
      else scheduleRetry();
      }