phacility/phabricator · error · ConduitException
ERR_NOT_FOUND
ERR_NOT_FOUND
Error message
ERR_NOT_FOUND
What it means
Thrown by the differential.getcommitpaths Conduit method. It loads the revision from revision_id with a policy-filtered query; if none is found it throws ConduitException('ERR_NOT_FOUND') (documented as 'No such revision exists.') before listing the filenames of the latest diff's changesets.
Source
Thrown at src/applications/differential/conduit/DifferentialGetCommitPathsConduitAPIMethod.php:40
protected function defineReturnType() {
return 'nonempty list<string>';
}
protected function defineErrorTypes() {
return array(
'ERR_NOT_FOUND' => pht('No such revision exists.'),
);
}
protected function execute(ConduitAPIRequest $request) {
$id = $request->getValue('revision_id');
$revision = id(new DifferentialRevisionQuery())
->setViewer($request->getUser())
->withIDs(array($id))
->executeOne();
if (!$revision) {
throw new ConduitException('ERR_NOT_FOUND');
}
$paths = array();
$diff = id(new DifferentialDiff())->loadOneWhere(
'revisionID = %d ORDER BY id DESC limit 1',
$revision->getID());
$diff->attachChangesets($diff->loadChangesets());
foreach ($diff->getChangesets() as $changeset) {
$paths[] = $changeset->getFilename();
}
return $paths;
}
}
View on GitHub (pinned to 5720a38cfe)
Solutions
- Pass revision_id as a bare integer verified to exist (differential.query)
- Run with a token whose user can see the revision
- Treat ERR_NOT_FOUND as a skip condition in batch file-listing jobs
- Note the method reads the latest diff only - if you need another diff's paths use differential.getdiff with diff_id
Example fix
// before
$params = array('revision_id' => 'D33');
// after
$params = array('revision_id' => 33); Defensive patterns
Strategy: try-catch
Validate before calling
$found = $client->callMethodSynchronous('differential.query',
array('ids' => array((int)$rev_id)));
if (!$found) {
return array(); // no revision, no paths
} Try / catch
try {
$paths = $client->callMethodSynchronous('differential.getcommitpaths',
array('revision_id' => (int)$rev_id));
} catch (ConduitClientException $ex) {
if ($ex->getErrorCode() === 'ERR_NOT_FOUND') {
$paths = array();
} else {
throw $ex;
}
} Prevention
- Validate revision_id as a positive integer
- Skip missing revisions in changelog tooling instead of aborting
- Remember the method reflects only the latest diff
When it happens
Trigger: Calling differential.getcommitpaths with a nonexistent revision_id, a 'D'-prefixed or null value, or a revision hidden from the acting user.
Common situations: Tooling that enumerates touched files for commit hooks or changelogs using IDs harvested from older sources; bots without access to the revision's space; typos in configuration.
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/37bf498beccce5d6.
Report an issue: GitHub.