{"record":{"id":"626d5f65f35bb674","repo":"phacility/phabricator","slug":"object-s-is-not-a-valid-object","errorCode":null,"errorMessage":"Object \"%s\" is not a valid object.","messagePattern":"Object \"(.+?)\" is not a valid object\\.","errorType":"exception","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/audit/management/PhabricatorAuditManagementWorkflow.php","lineNumber":53,"sourceCode":"          'Specify either a list of objects to affect or \"--all\", but not '.\n          'both.'));\n    }\n\n    if ($all) {\n      $objects = new LiskMigrationIterator(new PhabricatorRepository());\n    } else {\n      $query = id(new PhabricatorObjectQuery())\n        ->setViewer($viewer)\n        ->withNames($names);\n\n      $query->execute();\n\n      $objects = array();\n\n      $results = $query->getNamedResults();\n      foreach ($names as $name) {\n        if (!isset($results[$name])) {\n          throw new PhutilArgumentUsageException(\n            pht(\n              'Object \"%s\" is not a valid object.',\n              $name));\n        }\n\n        $object = $results[$name];\n        if (!($object instanceof PhabricatorRepository) &&\n            !($object instanceof PhabricatorRepositoryCommit)) {\n          throw new PhutilArgumentUsageException(\n            pht(\n              'Object \"%s\" is not a valid repository or commit.',\n              $name));\n        }\n\n        $objects[] = $object;\n      }\n    }\n","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/audit/management/PhabricatorAuditManagementWorkflow.php#L35-L71","documentation":"Guard in loadCommitsWithConstraints(): one of the names passed on the command line did not resolve through PhabricatorObjectQuery, meaning no object with that monogram exists (or it is not visible). The workflow names the offending object.","triggerScenarios":"Thrown at src/applications/audit/management/PhabricatorAuditManagementWorkflow.php:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the monogram spelling (e.g. rP1234 vs R1234) and retry","Confirm the object exists by opening it in the web UI","Remove the bad name from the argument list"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","contentChangedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}