{"record":{"id":"bcf8683c6dd3c7b4","repo":"phacility/phabricator","slug":"unable-to-load-specified-webhook-s","errorCode":null,"errorMessage":"Unable to load specified webhook (\"%s\").","messagePattern":"Unable to load specified webhook \\(\"(.+?)\"\\)\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/herald/management/HeraldWebhookCallManagementWorkflow.php","lineNumber":71,"sourceCode":"    }\n\n    $count = $args->getArg('count');\n    if ($count === null) {\n      $count = 1;\n    }\n\n    if ($count <= 0) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specified \"--count\" must be larger than 0.'));\n    }\n\n    $hook = id(new HeraldWebhookQuery())\n      ->setViewer($viewer)\n      ->withIDs(array($id))\n      ->executeOne();\n    if (!$hook) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Unable to load specified webhook (\"%s\").',\n          $id));\n    }\n\n    $object_name = $args->getArg('object');\n    if ($object_name === null) {\n      $object = $hook;\n    } else {\n      $objects = id(new PhabricatorObjectQuery())\n        ->setViewer($viewer)\n        ->withNames(array($object_name))\n        ->execute();\n      if (!$objects) {\n        throw new PhutilArgumentUsageException(\n          pht(\n            'Unable to load specified object (\"%s\").',\n            $object_name));","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/herald/management/HeraldWebhookCallManagementWorkflow.php#L53-L89","documentation":"'bin/herald call-webhook' loads the webhook with HeraldWebhookQuery restricted to withIDs(array($id)) as the CLI admin viewer; when no row matches, this usage exception is thrown. Since the viewer is an admin, the practical cause is that no webhook with that numeric ID exists.","triggerScenarios":"Running './bin/herald call-webhook --id 999' when 999 does not exist; using an ID copied from a different environment; the webhook was deleted after the ID was recorded.","commonSituations":"Environment mismatch (dev ID used on prod); webhook deleted or recreated with a new ID; passing the PHID (PHID-HWEB-...) where the numeric ID is required.","solutions":["Open the Webhooks console (/webhook/) and use the numeric ID shown there.","Confirm you are running the command against the correct database/environment.","If you only have the PHID, look up its numeric ID in the webhook URL or database, then re-run with --id."],"exampleFix":"// before\n./bin/herald call-webhook --id 999 --object T123\n// after\n./bin/herald call-webhook --id 3 --object T123","handlingStrategy":"validation","validationCode":"// Verify the webhook exists before shelling out:\n$hook = id(new HeraldWebhookQuery())\n  ->setViewer(PhabricatorUser::getOmnipotentUser())\n  ->withIDs(array($id))\n  ->executeOne();\nif (!$hook) {\n  throw new InvalidArgumentException('No webhook with id '.$id);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Resolve webhook IDs from the live environment (UI or HeraldWebhookQuery) instead of hardcoding per-environment constants.","Pass the numeric ID from the webhook URL, never the PHID."],"tags":["herald","webhook","phabricator","cli","entity-not-found"],"backgroundTag":"entity-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}