phacility/phabricator · error · Exception

In call to "transaction.search", specified "objectIdentifier

Error message

In call to "transaction.search", specified "objectIdentifier" ("%s") does not exist.

What it means

When objectIdentifier is used, PhabricatorObjectQuery resolves it by name/monogram/PHID with the calling user's authority; if nothing visible matches, this Exception is thrown. Note the visibility clause: a real object the acting user cannot see produces the same error as a nonexistent one. Monograms (T123), raw PHIDs, and other name formats are all resolved by the same withNames() query.

Source

Thrown at src/applications/transactions/conduit/TransactionSearchConduitAPIMethod.php:397

      if (!isset($all_types[$object_type])) {
        ksort($all_types);
        throw new Exception(
          pht(
            'In call to "transaction.search", specified "objectType" ("%s") '.
            'is unknown. Valid object types are: %s.',
            $object_type,
            implode(', ', array_keys($all_types))));
      }

      $object = $all_types[$object_type]->newObject();
    } else {
      $object = id(new PhabricatorObjectQuery())
        ->setViewer($viewer)
        ->withNames(array($object_identifier))
        ->executeOne();
      if (!$object) {
        throw new Exception(
          pht(
            'In call to "transaction.search", specified "objectIdentifier" '.
            '("%s") does not exist.',
            $object_identifier));
      }
    }

    if (!($object instanceof PhabricatorApplicationTransactionInterface)) {
      throw new Exception(
        pht(
          'In call to "transaction.search", selected object (of type "%s") '.
          'does not implement "%s", so transactions can not be loaded for it.',
          get_class($object),
          'PhabricatorApplicationTransactionInterface'));
    }

    return $object;
  }

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Open the identifier in the web UI as the same user the conduit token belongs to, to confirm it exists and is visible.
  2. Check and widen the object's view policy for the API user if visibility is the cause.
  3. Prefer raw PHIDs when available — they skip monogram-parsing differences between applications.

Example fix

# before
{"objectIdentifier": "T99999"}
# after
{"objectIdentifier": "T123"}  # verified visible to the API user
Defensive patterns

Strategy: validation

Validate before calling

// PHP: resolve the object first with the same viewer; only then call
$object = id(new PhabricatorObjectQuery())
  ->setViewer($viewer)
  ->withNames(array($identifier))
  ->executeOne();
if (!$object) {
  // handle not-found / not-visible before hitting transaction.search
}

Type guard

// PHP: the identifier resolved to a real, visible object
function objectResolves($viewer, $identifier) {
  return (bool) id(new PhabricatorObjectQuery())
    ->setViewer($viewer)
    ->withNames(array($identifier))
    ->executeOne();
}

Try / catch

Catch the conduit error client-side, match 'does not exist', and branch on cause: verify spelling first, then check the API user's visibility of the object before surfacing an error.

Prevention

When it happens

Trigger: Passing objectIdentifier 'T99999' that does not exist; passing a monogram copied from another install; the conduit token's user lacks permission to see the target object.

Common situations: Bot/API accounts with narrow policy visibility; identifiers copied between test and prod; typo'd monograms in hand-written integrations.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/4234325904f681bf. Report an issue: GitHub.