{"record":{"id":"692722d822d3119e","repo":"phacility/phabricator","slug":"object-s-does-not-implement-interface-s-aut","errorCode":null,"errorMessage":"Object \"%s\" does not implement interface \"%s\". Autotargets may only be queried for buildable objects.","messagePattern":"Object \"(.+?)\" does not implement interface \"(.+?)\"\\. Autotargets may only be queried for buildable objects\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/harbormaster/conduit/HarbormasterQueryAutotargetsConduitAPIMethod.php","lineNumber":45,"sourceCode":"\n    $phid = $request->getValue('objectPHID');\n\n    // NOTE: We use withNames() to let monograms like \"D123\" work, which makes\n    // this a little easier to test. Real PHIDs will still work as expected.\n\n    $object = id(new PhabricatorObjectQuery())\n      ->setViewer($viewer)\n      ->withNames(array($phid))\n      ->executeOne();\n    if (!$object) {\n      throw new Exception(\n        pht(\n          'No such object \"%s\" exists.',\n          $phid));\n    }\n\n    if (!($object instanceof HarbormasterBuildableInterface)) {\n      throw new Exception(\n        pht(\n          'Object \"%s\" does not implement interface \"%s\". Autotargets may '.\n          'only be queried for buildable objects.',\n          $phid,\n          'HarbormasterBuildableInterface'));\n    }\n\n    $autotargets = $request->getValue('targetKeys', array());\n\n    if ($autotargets) {\n      $targets = id(new HarbormasterTargetEngine())\n        ->setViewer($viewer)\n        ->setObject($object)\n        ->setAutoTargetKeys($autotargets)\n        ->buildTargets();\n    } else {\n      $targets = array();\n    }","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/harbormaster/conduit/HarbormasterQueryAutotargetsConduitAPIMethod.php#L27-L63","documentation":"Error \"Object \"%s\" does not implement interface \"%s\". Autotargets may only be queried for buildable objects.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/harbormaster/conduit/HarbormasterQueryAutotargetsConduitAPIMethod.php:45 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"}