{"record":{"id":"5277d116cac56d8c","repo":"phacility/phabricator","slug":"header-has-unterminated-double-quote-for-key-s","errorCode":null,"errorMessage":"Header has unterminated double quote for key \"%s\".","messagePattern":"Header has unterminated double quote for key \"(.+?)\"\\.","errorType":"validation","errorClass":"Exception","httpStatus":500,"severity":"error","filePath":"src/aphront/headerparser/AphrontHTTPHeaderParser.php","lineNumber":128,"sourceCode":"            $ii++;\n            break;\n          }\n\n          $pairs[] = array(\n            $pair_name,\n            $pair_value,\n          );\n\n          $pair_name = null;\n          $pair_value = null;\n\n          $state = 'prekey';\n          break;\n      }\n    }\n\n    if ($state == 'quoted') {\n      throw new Exception(\n        pht(\n          'Header has unterminated double quote for key \"%s\".',\n          $pair_name));\n    }\n\n    if ($pair_name !== null) {\n      $pairs[] = array(\n        $pair_name,\n        $pair_value,\n      );\n    }\n\n    return $pairs;\n  }\n\n  private function requireParse() {\n    if ($this->name === null) {\n      throw new PhutilInvalidStateException('parseRawHeader');","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/aphront/headerparser/AphrontHTTPHeaderParser.php#L110-L146","documentation":"Thrown by the shared loader PhabricatorRepositoryManagementWorkflow::loadRepositories() when one of the identifiers passed on the command line cannot be resolved to a repository by PhutilRepositoryQuery. Identifiers may be monograms (R123), callsigns, or UUIDs; any identifier missing from the query's identifier map aborts the workflow with this message. It fires across all 'bin/repository ...' management subcommands that accept repository names.","triggerScenarios":"Running any management workflow with an unknown identifier, e.g. 'bin/repository update R999999' or a typo'd/deleted callsign: the identifier map from PhabricatorRepositoryQuery lacks the key, and the loop at PhabricatorRepositoryManagementWorkflow.php:22 throws.","commonSituations":"Typos in monikers or callsigns; repositories deleted or renamed after runbooks were written; scripts generating identifiers from stale exports; wrong Phabricator instance (dev vs prod) where the repository does not exist.","solutions":["List valid identifiers first ('bin/repository list' or the Repositories UI) and copy the exact monogram.","If the repository was deleted or renamed, update scripts/runbooks to the current identifier.","Confirm you are pointed at the correct Phabricator instance/cluster host."],"exampleFix":"# before\nbin/repository update R321\n\n# after (find the real monogram first)\nbin/repository list | grep myproject\nbin/repository update R123","handlingStrategy":"validation","validationCode":"// Resolve identifiers before running the workflow:\n$map = id(new PhabricatorRepositoryQuery())\n  ->setViewer($viewer)\n  ->needURIs(true)\n  ->withIdentifiers($identifiers)\n  ->executeAndGetIdentifierMap();\n$unknown = array_diff($identifiers, array_keys($map));\nif ($unknown) { /* fail with the unknown list before doing work */ }","typeGuard":null,"tryCatchPattern":"catch (PhutilArgumentUsageException $ex) {\n  if (preg_match('/does not exist/', $ex->getMessage())) { /* surface identifier typo */ }\n}","preventionTips":["Source monikers dynamically (repository list / Conduit) instead of hardcoding them.","Recheck runbook identifiers after repository renames or deletions."],"tags":["phabricator","cli","entity-not-found","repository-management"],"backgroundTag":"entity-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}