phacility/phabricator · error · Exception

No object exists with ID "%s".

Error message

No object exists with ID "%s".

What it means

Thrown by PhabricatorEditEngine::newObjectFromIdentifier() when the identifier is a plain integer (or a digit string) and the engine's own query (newObjectFromID, loaded with the requested capability caps such as EDIT) returns no object. Because Phabricator policy filtering happens inside the query, 'no object' covers both a truly nonexistent ID and an object the acting viewer cannot see or edit.

Source

Thrown at src/applications/transactions/editengine/PhabricatorEditEngine.php:718

  /**
   * Try to load an object by ID, PHID, or monogram. This is done primarily
   * to make Conduit a little easier to use.
   *
   * @param wild ID, PHID, or monogram.
   * @param list<const> List of required capability constants, or omit for
   *   defaults.
   * @return object Corresponding editable object.
   * @task load
   */
  private function newObjectFromIdentifier(
    $identifier,
    array $capabilities = array()) {
    if (is_int($identifier) || ctype_digit($identifier)) {
      $object = $this->newObjectFromID($identifier, $capabilities);

      if (!$object) {
        throw new Exception(
          pht(
            'No object exists with ID "%s".',
            $identifier));
      }

      return $object;
    }

    $type_unknown = PhabricatorPHIDConstants::PHID_TYPE_UNKNOWN;
    if (phid_get_type($identifier) != $type_unknown) {
      $object = $this->newObjectFromPHID($identifier, $capabilities);

      if (!$object) {
        throw new Exception(
          pht(
            'No object exists with PHID "%s".',
            $identifier));
      }

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Verify the object exists and is visible to the same viewer/credentials before editing (e.g. conduit maniphest.search with constraints.ids, or the corresponding *.search method)
  2. Resolve monograms/PHIDs freshly at edit time instead of caching numeric IDs in config or scripts
  3. If the object exists but the viewer is a bot, grant it view/edit policy access or use credentials of a user who can see the object
  4. Catch the exception in the caller and treat it as a not-found/forbidden branch instead of crashing

Example fix

// before: editing via a stale numeric id
$parameters = array('objectIdentifier' => 1234, 'transactions' => $transactions);
$result = $client->callMethod('maniphest.edit', $parameters);
// Exception: No object exists with ID "1234".

// after: confirm the id resolves for this viewer, then edit
$found = $client->callMethod('maniphest.search', array(
  'constraints' => array('ids' => array(1234)),
));
if (!$found['data']) {
  // handle not-found / not-visible without triggering the exception
}
$result = $client->callMethod('maniphest.edit', $parameters);
Defensive patterns

Strategy: validation

Validate before calling

// Before editing, confirm the id resolves for the SAME credentials:
$found = $client->callMethod('maniphest.search', array(
  'constraints' => array('ids' => array((int)$object_id)),
));
if (empty($found['data'])) {
  // object missing or invisible to this viewer; do not call *.edit
}

Try / catch

try {
  $result = $client->callMethod('maniphest.edit', $parameters);
} catch (ConduitClientException $ex) {
  if (strpos($ex->getMessage(), 'No object exists with ID') === 0) {
    // treat as not-found/forbidden: log, skip, or re-resolve the reference
  } else {
    throw $ex;
  }
}

Prevention

When it happens

Trigger: Calling an edit-engine-backed Conduit method (maniphest.edit, differential.revision.edit, ...) or an /edit/ URL with objectIdentifier=1234 where that ID was deleted, belongs to another install, or is invisible/non-editable by the request viewer under the requested capabilities.

Common situations: Scripts hardcoding task/revision IDs that were later deleted; passing an ID read from one Phabricator instance into another; a bot/conduit-token user lacking view or edit permission on the target object; race where the object is deleted between listing and editing.

Related errors


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