phacility/phabricator · error · Exception

Parameter "paths" to Conduit API method "differential.query"

Error message

Parameter "paths" to Conduit API method "differential.query" is no longer supported. Use the "paths" constraint to "differential.revision.search" instead. See T13639.

What it means

The paths parameter of the legacy Conduit method differential.query was removed (upstream task T13639); path-based filtering moved to the modern method differential.revision.search. differential.query now throws unconditionally whenever paths is non-empty, so every legacy caller that filters by path fails hard.

Source

Thrown at src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php:95

    $subscribers        = $request->getValue('subscribers');
    $responsible_users  = $request->getValue('responsibleUsers');
    $branches           = $request->getValue('branches');

    $query = id(new DifferentialRevisionQuery())
      ->setViewer($request->getUser());

    if ($authors) {
      $query->withAuthors($authors);
    }
    if ($ccs) {
      $query->withCCs($ccs);
    }
    if ($reviewers) {
      $query->withReviewers($reviewers);
    }

    if ($path_pairs) {
      throw new Exception(
        pht(
          'Parameter "paths" to Conduit API method "differential.query" is '.
          'no longer supported. Use the "paths" constraint to '.
          '"differential.revision.search" instead. See T13639.'));
    }

    if ($commit_hashes) {
      $hash_types = ArcanistDifferentialRevisionHash::getTypes();
      foreach ($commit_hashes as $info) {
        list($type, $hash) = $info;
        if (empty($type) ||
            !in_array($type, $hash_types) ||
            empty($hash)) {
              throw new ConduitException('ERR-INVALID-PARAMETER');
        }
      }
      $query->withCommitHashes($commit_hashes);
    }

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Replace the call with differential.revision.search and pass constraints.paths, e.g. {"constraints":{"paths":["src/app/foo.php"]}}.
  2. If path filtering was optional, drop the paths parameter from differential.query and filter results client-side.
  3. Update arcanist/arc tooling to a current version that already emits the modern call.

Example fix

// before
$client->callMethodSynchronous('differential.query', array(
  'paths' => array('src/app/foo.php'),
));

// after
$client->callMethodSynchronous('differential.revision.search', array(
  'constraints' => array('paths' => array('src/app/foo.php')),
));
Defensive patterns

Strategy: fallback

Validate before calling

// strip the removed parameter before calling the legacy method
unset($params['paths']);
$revisions = $client->callMethodSynchronous('differential.query', $params);

Try / catch

try {
  $revisions = $client->callMethodSynchronous('differential.query', $params);
} catch (ConduitClientException $ex) {
  if (strpos($ex->getMessage(), 'no longer supported') !== false) {
    $revisions = $client->callMethodSynchronous(
      'differential.revision.search',
      array('constraints' => array('paths' => $paths)));
  } else {
    throw $ex;
  }
}

Prevention

When it happens

Trigger: Any call to differential.query that includes a non-empty paths array; no validation or partial support exists, the method throws as soon as it sees the parameter.

Common situations: Third-party integrations and older arc workflows written before the removal; a Phabricator instance upgraded past the change breaks scripts and cron jobs that still send paths.

Related errors


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