Significant-Gravitas/AutoGPT · error · Error

Failed to search users

Error message

Failed to search users

What it means

NotFoundError raised by execute_transfer when no TransferRequest row exists for the given transfer_id. Distinct from the state/permission ValueErrors that follow it in the same function.

Source

Thrown at autogpt_platform/frontend/src/app/(platform)/admin/rate-limits/components/useRateLimitManager.ts:87

      setRateLimitData(null);
    } finally {
      setIsSearching(false);
    }
  }

  async function handleFuzzySearch(trimmed: string) {
    setIsSearching(true);
    setSearchResults([]);
    setSelectedUser(null);
    setRateLimitData(null);

    try {
      const response = await getV2SearchUsersByNameOrEmail({
        query: trimmed,
        limit: 20,
      });
      if (response.status !== 200) {
        throw new Error("Failed to search users");
      }

      const users = (response.data ?? []).map((u) => ({
        user_id: u.user_id,
        user_email: u.user_email ?? u.user_id,
      }));
      if (users.length === 0) {
        toast({ title: "No results", description: "No users found." });
      }
      setSearchResults(users);
    } catch (error) {
      console.error("Error searching users:", error);
      toast({
        title: "Error",
        description: "Failed to search users.",
        variant: "destructive",
      });
    } finally {

View on GitHub (pinned to 9c8bb5550f)

Solutions

  1. GET the transfer by id before executing; treat 404 as 'refresh the list'.
  2. Verify environment/database consistency between the call that listed transfers and the one executing.
  3. Log the transfer_id at the call site to catch truncation.

Example fix

# before
await execute_transfer(tid, user_id, org_id)

# after
tr = await get_transfer(tid)
await execute_transfer(tr.id, user_id, org_id)
Defensive patterns

Strategy: validation

Validate before calling

tr = await get_transfer(transfer_id)  # confirm existence first
await execute_transfer(tr.id, user_id, org_id)

Try / catch

try:
    await execute_transfer(tid, user_id, org_id)
except NotFoundError:
    refresh_transfer_list()

Prevention

When it happens

Trigger: POST execute with a nonexistent, deleted, or wrong-environment transfer id. Also happens when a transfer list was fetched from one DB and the execute call hits another (env mismatch).

Common situations: Stale frontend state after a transfer is removed; id typos or truncation; dev backend pointing at staging data.

Related errors


AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14). Data as JSON: /api/errors/cb73772b54e20c21. Report an issue: GitHub.