{"record":{"id":"996136ce3348244a","repo":"phacility/phabricator","slug":"call-includes-unit-parameter-this-parameter-mus","errorCode":null,"errorMessage":"Call includes \"unit\" parameter. This parameter must be omitted when the receiver is not a Build Target.","messagePattern":"Call includes \"unit\" parameter\\. This parameter must be omitted when the receiver is not a Build Target\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php","lineNumber":550,"sourceCode":"\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) {\n      throw new Exception(\n        pht(\n          'Call includes \"lint\" parameter. This parameter must be omitted '.\n          'when the receiver is not a Build Target.'));\n    }\n\n    $is_build = ($receiver_object instanceof HarbormasterBuild);\n    if ($is_build) {\n      return $this->sendToBuild($request, $message_type, $receiver_object);\n    }\n\n    $is_buildable = ($receiver_object instanceof HarbormasterBuildable);","sourceCodeStart":532,"sourceCodeEnd":568,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php#L532-L568","documentation":"Error \"Call includes \"unit\" parameter. This parameter must be omitted when the receiver is not a Build Target.\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php:550 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"}