{"record":{"id":"0bfe3a7ce9999457","repo":"phacility/phabricator","slug":"no-such-object-s-0bfe3a","errorCode":null,"errorMessage":"No such object '%s'!","messagePattern":"No such object '(.+?)'!","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/policy/management/PhabricatorPolicyManagementShowWorkflow.php","lineNumber":42,"sourceCode":"    $obj_names = $args->getArg('objects');\n    if (!$obj_names) {\n      throw new PhutilArgumentUsageException(\n        pht('Specify the name of an object to show policy information for.'));\n    } else if (count($obj_names) > 1) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify the name of exactly one object to show policy information '.\n          'for.'));\n    }\n\n    $object = id(new PhabricatorObjectQuery())\n      ->setViewer($viewer)\n      ->withNames($obj_names)\n      ->executeOne();\n\n    if (!$object) {\n      $name = head($obj_names);\n      throw new PhutilArgumentUsageException(\n        pht(\n          \"No such object '%s'!\",\n          $name));\n    }\n\n    $handle = id(new PhabricatorHandleQuery())\n      ->setViewer($viewer)\n      ->withPHIDs(array($object->getPHID()))\n      ->executeOne();\n\n    $policies = PhabricatorPolicyQuery::loadPolicies(\n      $viewer,\n      $object);\n\n    $console->writeOut(\"__%s__\\n\\n\", pht('OBJECT'));\n    $console->writeOut(\"  %s\\n\", $handle->getFullName());\n    $console->writeOut(\"\\n\");\n","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/policy/management/PhabricatorPolicyManagementShowWorkflow.php#L24-L60","documentation":"After the single object name is resolved with PhabricatorObjectQuery::withNames, a null result throws this usage exception naming the input. Resolution happens under the workflow's viewer, so an object that exists but is invisible to that viewer behaves exactly like one that does not exist.","triggerScenarios":"Running ./bin/policy show T99999 with a misspelled or nonexistent monogram or PHID, or naming an object the executing viewer cannot see.","commonSituations":"Typos in monograms, objects deleted between copy and paste, and PHIDs copied from another install.","solutions":["Verify the name resolves first: ./bin/phid lookup T123","Re-check the monogram for typos and re-run with the exact name.","If the object exists but is hidden, run the command with a viewer that can see the object."],"exampleFix":"# before\n./bin/policy show T9999\n# after\n./bin/phid lookup T123   # confirm it resolves, then\n./bin/policy show T123","handlingStrategy":"validation","validationCode":"name='T123'\nout=$(./bin/phid lookup \"$name\")\n[ -n \"$out\" ] || { echo \"unknown object: $name\" >&2; exit 1; }\n./bin/policy show \"$name\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Resolve monograms with ./bin/phid lookup before passing them to policy workflows.","Copy names from the UI instead of retyping them.","Remember resolution runs under the workflow's viewer; hidden objects look identical to missing ones."],"tags":["phabricator","cli","object-not-found","policy"],"backgroundTag":"object-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}