{"record":{"id":"67c230730d8688ca","repo":"phacility/phabricator","slug":"no-such-build-target-s","errorCode":null,"errorMessage":"No such build target \"%s\"!","messagePattern":"No such build target \"(.+?)\"!","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/harbormaster/conduit/HarbormasterCreateArtifactConduitAPIMethod.php","lineNumber":112,"sourceCode":"      'artifactType' => 'string',\n      'artifactData' => 'map<string, wild>',\n    );\n  }\n\n  protected function defineReturnType() {\n    return 'wild';\n  }\n\n  protected function execute(ConduitAPIRequest $request) {\n    $viewer = $request->getUser();\n\n    $build_target_phid = $request->getValue('buildTargetPHID');\n    $build_target = id(new HarbormasterBuildTargetQuery())\n      ->setViewer($viewer)\n      ->withPHIDs(array($build_target_phid))\n      ->executeOne();\n    if (!$build_target) {\n      throw new Exception(\n        pht(\n          'No such build target \"%s\"!',\n          $build_target_phid));\n    }\n\n    $artifact_type = $request->getValue('artifactType');\n\n    // Cast \"artifactData\" parameters to acceptable types if this request\n    // is submitting raw HTTP parameters. This is not ideal. See T11887 for\n    // discussion.\n    $artifact_data = $request->getValue('artifactData');\n    if (!$request->getIsStrictlyTyped()) {\n      $impl = HarbormasterArtifact::getArtifactType($artifact_type);\n      if ($impl) {\n        foreach ($artifact_data as $key => $value) {\n          $artifact_data[$key] = $impl->readArtifactHTTPParameter(\n            $key,\n            $value);","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/harbormaster/conduit/HarbormasterCreateArtifactConduitAPIMethod.php#L94-L130","documentation":"Fires in the harbormaster.createartifact Conduit method when a HarbormasterBuildTargetQuery for the supplied buildTargetPHID returns no row. This is a policy-filtered lookup-miss guard: the PHID may be wrong, the target deleted, or invisible to the acting user; the offending PHID is interpolated into the message.","triggerScenarios":"Thrown at src/applications/harbormaster/conduit/HarbormasterCreateArtifactConduitAPIMethod.php:112 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the build target PHID is correct and not deleted","Check the conduit user has permission to see the build target","Ensure the target exists before the artifact-creation call runs"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","contentChangedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}