phacility/phabricator · error · Exception

Receiver object (of class " ") is not a valid receiver.

Error message

Receiver object (of class "%s") is not a valid receiver.

What it means

Receiver-type dispatch fallthrough in 'harbormaster.sendmessage': the resolved receiver object is neither a HarbormasterBuildTarget, Build, nor Buildable, so no message-sending path applies for its class.

Solutions

  1. Address a build, buildable, or build target receiver
  2. Check the receiver PHID's object type — it likely points at the wrong kind of object
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php:573 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/1fb5b7543a9dd9b2. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php:573

    if ($request->getValue('lint') !== null) {
      throw new Exception(
        pht(
          'Call includes "lint" parameter. This parameter must be omitted '.
          'when the receiver is not a Build Target.'));
    }

    $is_build = ($receiver_object instanceof HarbormasterBuild);
    if ($is_build) {
      return $this->sendToBuild($request, $message_type, $receiver_object);
    }

    $is_buildable = ($receiver_object instanceof HarbormasterBuildable);
    if ($is_buildable) {
      return $this->sendToBuildable($request, $message_type, $receiver_object);
    }

    throw new Exception(
      pht(
        'Receiver object (of class "%s") is not a valid receiver.',
        get_class($receiver_object)));
  }

  private function sendToTarget(
    ConduitAPIRequest $request,
    $message_type,
    HarbormasterBuildTarget $build_target) {
    $viewer = $request->getViewer();

    $save = array();

    $lint_messages = $request->getValue('lint', array());
    foreach ($lint_messages as $lint) {
      $save[] = HarbormasterBuildLintMessage::newFromDictionary(
        $build_target,
        $lint);

View on GitHub (pinned to 5720a38cfe)