{"record":{"id":"4234325904f681bf","repo":"phacility/phabricator","slug":"in-call-to-transaction-search-specified-object-423432","errorCode":null,"errorMessage":"In call to \"transaction.search\", specified \"objectIdentifier\" (\"%s\") does not exist.","messagePattern":"In call to \"transaction\\.search\", specified \"objectIdentifier\" \\(\"(.+?)\"\\) does not exist\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/transactions/conduit/TransactionSearchConduitAPIMethod.php","lineNumber":397,"sourceCode":"\n      if (!isset($all_types[$object_type])) {\n        ksort($all_types);\n        throw new Exception(\n          pht(\n            'In call to \"transaction.search\", specified \"objectType\" (\"%s\") '.\n            'is unknown. Valid object types are: %s.',\n            $object_type,\n            implode(', ', array_keys($all_types))));\n      }\n\n      $object = $all_types[$object_type]->newObject();\n    } else {\n      $object = id(new PhabricatorObjectQuery())\n        ->setViewer($viewer)\n        ->withNames(array($object_identifier))\n        ->executeOne();\n      if (!$object) {\n        throw new Exception(\n          pht(\n            'In call to \"transaction.search\", specified \"objectIdentifier\" '.\n            '(\"%s\") does not exist.',\n            $object_identifier));\n      }\n    }\n\n    if (!($object instanceof PhabricatorApplicationTransactionInterface)) {\n      throw new Exception(\n        pht(\n          'In call to \"transaction.search\", selected object (of type \"%s\") '.\n          'does not implement \"%s\", so transactions can not be loaded for it.',\n          get_class($object),\n          'PhabricatorApplicationTransactionInterface'));\n    }\n\n    return $object;\n  }","sourceCodeStart":379,"sourceCodeEnd":415,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/transactions/conduit/TransactionSearchConduitAPIMethod.php#L379-L415","documentation":"When objectIdentifier is used, PhabricatorObjectQuery resolves it by name/monogram/PHID with the calling user's authority; if nothing visible matches, this Exception is thrown. Note the visibility clause: a real object the acting user cannot see produces the same error as a nonexistent one. Monograms (T123), raw PHIDs, and other name formats are all resolved by the same withNames() query.","triggerScenarios":"Passing objectIdentifier 'T99999' that does not exist; passing a monogram copied from another install; the conduit token's user lacks permission to see the target object.","commonSituations":"Bot/API accounts with narrow policy visibility; identifiers copied between test and prod; typo'd monograms in hand-written integrations.","solutions":["Open the identifier in the web UI as the same user the conduit token belongs to, to confirm it exists and is visible.","Check and widen the object's view policy for the API user if visibility is the cause.","Prefer raw PHIDs when available — they skip monogram-parsing differences between applications."],"exampleFix":"# before\n{\"objectIdentifier\": \"T99999\"}\n# after\n{\"objectIdentifier\": \"T123\"}  # verified visible to the API user","handlingStrategy":"validation","validationCode":"// PHP: resolve the object first with the same viewer; only then call\n$object = id(new PhabricatorObjectQuery())\n  ->setViewer($viewer)\n  ->withNames(array($identifier))\n  ->executeOne();\nif (!$object) {\n  // handle not-found / not-visible before hitting transaction.search\n}","typeGuard":"// PHP: the identifier resolved to a real, visible object\nfunction objectResolves($viewer, $identifier) {\n  return (bool) id(new PhabricatorObjectQuery())\n    ->setViewer($viewer)\n    ->withNames(array($identifier))\n    ->executeOne();\n}","tryCatchPattern":"Catch the conduit error client-side, match 'does not exist', and branch on cause: verify spelling first, then check the API user's visibility of the object before surfacing an error.","preventionTips":["Use raw PHIDs captured from upstream API responses instead of hand-typed monograms.","Verify identifiers as the conduit token's user, not an admin, when testing."],"tags":["phabricator","conduit","transaction-search","policy"],"backgroundTag":"resource-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}