phacility/phabricator · error · Exception

No repository exists with PHID

Error message

No repository exists with PHID "%s".

What it means

Lookup failure in DiffusionGetLintMessagesConduitAPIMethod::execute: the repositoryPHID parameter of the Conduit request does not correspond to any repository visible to the requesting user (PhabricatorRepositoryQuery with that single PHID returned no result). Either the PHID is wrong/typo'd or the user lacks permission to see the repository, so the lint-message lookup cannot proceed.

Solutions

  1. Double-check the repositoryPHID value being passed (it must be a valid PHID-REPO-nnnn style identifier)
  2. If the PHID is correct, verify the acting user has permission to view the repository
  3. Load the repository list via Conduit (repository.query) to confirm the correct PHID to use
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/diffusion/conduit/DiffusionGetLintMessagesConduitAPIMethod.php:41 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at src/applications/diffusion/conduit/DiffusionGetLintMessagesConduitAPIMethod.php:41

      'files'          => 'required list<string>',
    );
  }

  protected function defineReturnType() {
    return 'list<dict>';
  }

  protected function execute(ConduitAPIRequest $request) {
    $viewer = $request->getUser();

    $repository_phid = $request->getValue('repositoryPHID');
    $repository = id(new PhabricatorRepositoryQuery())
      ->setViewer($viewer)
      ->withPHIDs(array($repository_phid))
      ->executeOne();

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

    $branch_name = $request->getValue('branch');
    if ($branch_name == '') {
      $repository = id(new PhabricatorRepositoryQuery())
        ->setViewer($request->getUser())
        ->withIDs(array($repository->getID()))
        ->executeOne();
      $branch_name = $repository->getDefaultArcanistBranch();
    }

    $branch = id(new PhabricatorRepositoryBranch())->loadOneWhere(
      'repositoryID = %d AND name = %s',
      $repository->getID(),
      $branch_name);
    if (!$branch || !$branch->getLintCommit()) {
      return array();

View on GitHub (pinned to 5720a38cfe)