{"record":{"id":"5eed11a4452601c6","repo":"phacility/phabricator","slug":"file-phid-s-does-not-correspond-to-a-valid-file","errorCode":null,"errorMessage":"File PHID \"%s\" does not correspond to a valid file.","messagePattern":"File PHID \"(.+?)\" does not correspond to a valid file\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/harbormaster/artifact/HarbormasterFileArtifact.php","lineNumber":56,"sourceCode":"  }\n\n  public function willCreateArtifact(PhabricatorUser $actor) {\n    // NOTE: This is primarily making sure the actor has permission to view the\n    // file. We don't want to let you run builds using files you don't have\n    // permission to see, since this could let you violate permissions.\n    $this->loadArtifactFile($actor);\n  }\n\n  public function loadArtifactFile(PhabricatorUser $viewer) {\n    $artifact = $this->getBuildArtifact();\n    $file_phid = $artifact->getProperty('filePHID');\n\n    $file = id(new PhabricatorFileQuery())\n      ->setViewer($viewer)\n      ->withPHIDs(array($file_phid))\n      ->executeOne();\n    if (!$file) {\n      throw new Exception(\n        pht(\n          'File PHID \"%s\" does not correspond to a valid file.',\n          $file_phid));\n    }\n\n    return $file;\n  }\n\n}\n","sourceCodeStart":38,"sourceCodeEnd":66,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/harbormaster/artifact/HarbormasterFileArtifact.php#L38-L66","documentation":"Error \"File PHID \"%s\" does not correspond to a valid file.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/harbormaster/artifact/HarbormasterFileArtifact.php:56 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}