phacility/phabricator · error · Exception

File PHID "%s" does not correspond to a valid file.

Error message

File PHID "%s" does not correspond to a valid file.

What it means

Error "File PHID "%s" does not correspond to a valid file." thrown in phacility/phabricator.

Source

Thrown at src/applications/harbormaster/artifact/HarbormasterFileArtifact.php:56

  }

  public function willCreateArtifact(PhabricatorUser $actor) {
    // NOTE: This is primarily making sure the actor has permission to view the
    // file. We don't want to let you run builds using files you don't have
    // permission to see, since this could let you violate permissions.
    $this->loadArtifactFile($actor);
  }

  public function loadArtifactFile(PhabricatorUser $viewer) {
    $artifact = $this->getBuildArtifact();
    $file_phid = $artifact->getProperty('filePHID');

    $file = id(new PhabricatorFileQuery())
      ->setViewer($viewer)
      ->withPHIDs(array($file_phid))
      ->executeOne();
    if (!$file) {
      throw new Exception(
        pht(
          'File PHID "%s" does not correspond to a valid file.',
          $file_phid));
    }

    return $file;
  }

}

View on GitHub (pinned to 5720a38cfe)

When it happens

Trigger: Thrown at src/applications/harbormaster/artifact/HarbormasterFileArtifact.php:56 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/5eed11a4452601c6. Report an issue: GitHub.