phacility/phabricator · error · Exception

Object "%s" does not implement interface "%s". Autotargets m

Error message

Object "%s" does not implement interface "%s". Autotargets may only be queried for buildable objects.

What it means

Error "Object "%s" does not implement interface "%s". Autotargets may only be queried for buildable objects." thrown in phacility/phabricator.

Source

Thrown at src/applications/harbormaster/conduit/HarbormasterQueryAutotargetsConduitAPIMethod.php:45

    $phid = $request->getValue('objectPHID');

    // NOTE: We use withNames() to let monograms like "D123" work, which makes
    // this a little easier to test. Real PHIDs will still work as expected.

    $object = id(new PhabricatorObjectQuery())
      ->setViewer($viewer)
      ->withNames(array($phid))
      ->executeOne();
    if (!$object) {
      throw new Exception(
        pht(
          'No such object "%s" exists.',
          $phid));
    }

    if (!($object instanceof HarbormasterBuildableInterface)) {
      throw new Exception(
        pht(
          'Object "%s" does not implement interface "%s". Autotargets may '.
          'only be queried for buildable objects.',
          $phid,
          'HarbormasterBuildableInterface'));
    }

    $autotargets = $request->getValue('targetKeys', array());

    if ($autotargets) {
      $targets = id(new HarbormasterTargetEngine())
        ->setViewer($viewer)
        ->setObject($object)
        ->setAutoTargetKeys($autotargets)
        ->buildTargets();
    } else {
      $targets = array();
    }

View on GitHub (pinned to 5720a38cfe)

When it happens

Trigger: Thrown at src/applications/harbormaster/conduit/HarbormasterQueryAutotargetsConduitAPIMethod.php:45 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/692722d822d3119e. Report an issue: GitHub.