{"record":{"id":"1c54a0e81ce7c49a","repo":"phacility/phabricator","slug":"unable-to-load-object-s-to-receive-message","errorCode":null,"errorMessage":"Unable to load object \"%s\" to receive message.","messagePattern":"Unable to load object \"(.+?)\" to receive message\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php","lineNumber":538,"sourceCode":"        pht(\n          'Call omits required \"receiver\" parameter. Specify the PHID '.\n          'of the object you want to send a message to.'));\n    }\n\n    $message_type = $request->getValue('type');\n    if ($message_type === null || !strlen($message_type)) {\n      throw new Exception(\n        pht(\n          'Call omits required \"type\" parameter. Specify the type of '.\n          'message you want to send.'));\n    }\n\n    $receiver_object = id(new PhabricatorObjectQuery())\n      ->setViewer($viewer)\n      ->withNames(array($receiver_name))\n      ->executeOne();\n    if (!$receiver_object) {\n      throw new Exception(\n        pht(\n          'Unable to load object \"%s\" to receive message.',\n          $receiver_name));\n    }\n\n    $is_target = ($receiver_object instanceof HarbormasterBuildTarget);\n    if ($is_target) {\n      return $this->sendToTarget($request, $message_type, $receiver_object);\n    }\n\n    if ($request->getValue('unit') !== null) {\n      throw new Exception(\n        pht(\n          'Call includes \"unit\" parameter. This parameter must be omitted '.\n          'when the receiver is not a Build Target.'));\n    }\n\n    if ($request->getValue('lint') !== null) {","sourceCodeStart":520,"sourceCodeEnd":556,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php#L520-L556","documentation":"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.","triggerScenarios":"Thrown at src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php:538 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the receiver PHID is correct and the object exists","Check the conduit user's policy visibility on the receiver"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","contentChangedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}