phacility/phabricator · error · Exception
Call specifies both "receiver" and "buildTargetPHID". When…
Error message
Call specifies both "receiver" and "buildTargetPHID". When using the modern "receiver" parameter, omit the deprecated "buildTargetPHID" parameter.
What it means
Raised in harbormaster.sendmessage when both the modern 'receiver' parameter and the deprecated 'buildTargetPHID' are supplied with differing values. The API requires only 'receiver'; the conflicting call is rejected in execute().
Solutions
- Send only 'receiver' and drop 'buildTargetPHID'
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php:510 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/9a009ad3b324656b.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php:510
'buildTargetPHID' => 'deprecated optional phid',
);
}
protected function defineReturnType() {
return 'void';
}
protected function execute(ConduitAPIRequest $request) {
$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(View on GitHub (pinned to 5720a38cfe)