{"record":{"id":"9a009ad3b324656b","repo":"phacility/phabricator","slug":"call-specifies-both-receiver-and-buildtargetphi","errorCode":null,"errorMessage":"Call specifies both \"receiver\" and \"buildTargetPHID\". When using the modern \"receiver\" parameter, omit the deprecated \"buildTargetPHID\" parameter.","messagePattern":"Call specifies both \"receiver\" and \"buildTargetPHID\"\\. When using the modern \"receiver\" parameter, omit the deprecated \"buildTargetPHID\" parameter\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php","lineNumber":510,"sourceCode":"      'buildTargetPHID' => 'deprecated optional phid',\n    );\n  }\n\n  protected function defineReturnType() {\n    return 'void';\n  }\n\n  protected function execute(ConduitAPIRequest $request) {\n    $viewer = $request->getViewer();\n\n    $receiver_name = $request->getValue('receiver');\n\n    $build_target_phid = $request->getValue('buildTargetPHID');\n    if ($build_target_phid !== null) {\n      if ($receiver_name === null) {\n        $receiver_name = $build_target_phid;\n      } else {\n        throw new Exception(\n          pht(\n            'Call specifies both \"receiver\" and \"buildTargetPHID\". '.\n            'When using the modern \"receiver\" parameter, omit the '.\n            'deprecated \"buildTargetPHID\" parameter.'));\n      }\n    }\n\n    if ($receiver_name === null || !strlen($receiver_name)) {\n      throw new Exception(\n        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(","sourceCodeStart":492,"sourceCodeEnd":528,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php#L492-L528","documentation":"Error \"Call specifies both \"receiver\" and \"buildTargetPHID\". When using the modern \"receiver\" parameter, omit the deprecated \"buildTargetPHID\" parameter.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php:510 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}