koala73/worldmonitor · error · ConvexError

COMPANY_MONITORING_CLAIM_LIMIT_EXCEEDED

Error message

COMPANY_MONITORING_CLAIM_LIMIT_EXCEEDED

What it means

Error "COMPANY_MONITORING_CLAIM_LIMIT_EXCEEDED" thrown in koala73/worldmonitor.

Source

Thrown at convex/companyMonitoring/claimPolicyMigration.ts:69

      .paginate({
        cursor: args.cursor ?? null,
        numItems: CLAIM_POLICY_MIGRATION_COMPANY_PAGE_SIZE,
      });

    const now = Date.now();
    let claimsPatched = 0;
    let aliasesInserted = 0;
    for (const company of page.page) {
      const claims = await ctx.db
        .query("companyMonitoringClaims")
        .withIndex("by_account_company", (q) =>
          q
            .eq("ownerAccountId", args.ownerAccountId)
            .eq("companyId", company.companyId)
        )
        .take(CLAIM_READ_LIMIT);
      if (claims.length > COMPANY_MONITORING_LIMITS.maxClaimsPerCompany) {
        throw new ConvexError("COMPANY_MONITORING_CLAIM_LIMIT_EXCEEDED");
      }

      for (const claim of claims) {
        if (claim.provenance !== "customer" || claim.allowedUses !== undefined) continue;
        await ctx.db.patch(claim._id, {
          allowedUses: [...customerClaimAllowedUses(claim.type)],
          updatedAt: now,
        });
        claimsPatched += 1;
      }

      const hasCurrentNameAlias = company.name !== undefined && claims.some((claim) =>
        claim.provenance === "customer" &&
        claim.type === "alias" &&
        claim.value === company.name
      );
      if (company.name !== undefined && !hasCurrentNameAlias) {
        if (claims.length >= COMPANY_MONITORING_LIMITS.maxClaimsPerCompany) {

View on GitHub (pinned to ffec79ac33)

When it happens

Trigger: Thrown at convex/companyMonitoring/claimPolicyMigration.ts:69 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of koala73/worldmonitor@ffec79ac33 (2026-08-12). Data as JSON: /api/errors/de104829a9698d98. Report an issue: GitHub.