phacility/phabricator · error · Exception

No repository PHID for path

Error message

No repository PHID for path "%s"!

What it means

Form-integrity guard in the Owners package paths editor: the posted path rows and repository rows arrays are misaligned — a path entry has no corresponding repo PHID at the same key, which normal UI submissions never produce.

Solutions

  1. Submit the paths form unmodified so path/repo/exclude arrays stay key-aligned
  2. Check custom clients or scripts posting the form for missing 'repo' fields
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at src/applications/owners/controller/PhabricatorOwnersPathsController.php:31 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/0ed686c0e38f07d1. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/owners/controller/PhabricatorOwnersPathsController.php:31

        array(
          PhabricatorPolicyCapability::CAN_VIEW,
          PhabricatorPolicyCapability::CAN_EDIT,
        ))
      ->needPaths(true)
      ->executeOne();
    if (!$package) {
      return new Aphront404Response();
    }

    if ($request->isFormPost()) {
      $paths = $request->getArr('path');
      $repos = $request->getArr('repo');
      $excludes = $request->getArr('exclude');

      $path_refs = array();
      foreach ($paths as $key => $path) {
        if (!isset($repos[$key]) || !strlen($repos[$key])) {
          throw new Exception(
            pht(
              'No repository PHID for path "%s"!',
              $key));
        }

        if (!isset($excludes[$key])) {
          throw new Exception(
            pht(
              'No exclusion value for path "%s"!',
              $key));
        }

        $path_refs[] = array(
          'repositoryPHID' => $repos[$key],
          'path' => $path,
          'excluded' => (int)$excludes[$key],
        );
      }

View on GitHub (pinned to 5720a38cfe)