phacility/phabricator · error · Exception

Call omits required "receiver" parameter. Specify the PHID…

Error message

Call omits required "receiver" parameter. Specify the PHID of the object you want to send a message to.

What it means

Raised in harbormaster.sendmessage when neither 'receiver' nor the deprecated 'buildTargetPHID' yields a receiver name — the required 'receiver' parameter (PHID of the object to message) is missing or empty.

Solutions

  1. Supply the 'receiver' parameter with the target's PHID
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

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

    $viewer = $request->getViewer();

    $receiver_name = $request->getValue('receiver');

    $build_target_phid = $request->getValue('buildTargetPHID');
    if ($build_target_phid !== null) {
      if ($receiver_name === null) {
        $receiver_name = $build_target_phid;
      } else {
        throw new Exception(
          pht(
            'Call specifies both "receiver" and "buildTargetPHID". '.
            'When using the modern "receiver" parameter, omit the '.
            'deprecated "buildTargetPHID" parameter.'));
      }
    }

    if ($receiver_name === null || !strlen($receiver_name)) {
      throw new Exception(
        pht(
          'Call omits required "receiver" parameter. Specify the PHID '.
          'of the object you want to send a message to.'));
    }

    $message_type = $request->getValue('type');
    if ($message_type === null || !strlen($message_type)) {
      throw new Exception(
        pht(
          'Call omits required "type" parameter. Specify the type of '.
          'message you want to send.'));
    }

    $receiver_object = id(new PhabricatorObjectQuery())
      ->setViewer($viewer)
      ->withNames(array($receiver_name))
      ->executeOne();
    if (!$receiver_object) {

View on GitHub (pinned to 5720a38cfe)