phacility/phabricator · error · Exception

Unable to load object

Error message

Unable to load object "%s" to receive message.

What it means

Fires in harbormaster.sendmessage when a PhabricatorObjectQuery resolving the receiver name/PHID returns nothing: the object to receive the message cannot be loaded. Because the query is viewer-scoped this can mean a bad identifier, a deleted object, or insufficient visibility for the acting user.

Solutions

  1. Verify the receiver PHID is correct and the object exists
  2. Check the conduit user's policy visibility on the receiver
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

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

        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) {
      throw new Exception(
        pht(
          'Unable to load object "%s" to receive message.',
          $receiver_name));
    }

    $is_target = ($receiver_object instanceof HarbormasterBuildTarget);
    if ($is_target) {
      return $this->sendToTarget($request, $message_type, $receiver_object);
    }

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

    if ($request->getValue('lint') !== null) {

View on GitHub (pinned to 5720a38cfe)