{"record":{"id":"299445e3317854c4","repo":"phacility/phabricator","slug":"expected-multipart-form-data-parse-to-end-in-sta","errorCode":null,"errorMessage":"Expected \"multipart/form-data\" parse to end in state \"epilogue\".","messagePattern":"Expected \"multipart/form-data\" parse to end in state \"epilogue\"\\.","errorType":"validation","errorClass":"Exception","httpStatus":500,"severity":"error","filePath":"src/aphront/multipartparser/AphrontMultipartParser.php","lineNumber":239,"sourceCode":"          $this->state = 'endboundary';\n          break;\n        case 'epilogue':\n          // We just discard any epilogue.\n          $this->buffer = '';\n          $continue = false;\n          break;\n        default:\n          throw new Exception(\n            pht(\n              'Unknown parser state \"%s\".\\n',\n              $this->state));\n      }\n    }\n  }\n\n  public function endParse() {\n    if ($this->state !== 'epilogue') {\n      throw new Exception(\n        pht(\n          'Expected \"multipart/form-data\" parse to end '.\n          'in state \"epilogue\".'));\n    }\n\n    return $this->parts;\n  }\n\n\n}\n","sourceCodeStart":221,"sourceCodeEnd":250,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/aphront/multipartparser/AphrontMultipartParser.php#L221-L250","documentation":"Thrown by 'bin/repository update' when the resolved repository set does not contain exactly one repository. This workflow runs pull and discovery for a single repository; passing zero or multiple resolved repositories is rejected before any pull starts. Because loadLocalRepositories() filters to repositories hosted on the current device, a correctly-named repository that is not local to this machine also resolves to zero and produces this error.","triggerScenarios":"Running 'bin/repository update' with no repos argument, with several monikers, or with a moniker whose repository is not hosted on this device: count($repos) !== 1 at PhabricatorRepositoryManagementUpdateWorkflow.php:52 throws.","commonSituations":"Running update on the wrong cluster node or on a web host without local working copies; scripts looping with a variable that expanded empty; passing a monogram with a typo so it resolves to nothing.","solutions":["Pass exactly one repository identifier: 'bin/repository update R123'.","Run the command on a device that actually hosts the working copy (verify with Almanac bindings or the repository's Cluster URI).","Check scripts for empty or unquoted repository variables."],"exampleFix":"# before\nbin/repository update\n\n# after\nbin/repository update R123 --verbose","handlingStrategy":"validation","validationCode":"# Resolve the monogram on this host before updating:\nbin/repository list \"$REPO\" >/dev/null 2>&1 || { echo 'repo not found on this device' >&2; exit 1; }\nbin/repository update \"$REPO\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Loop one repository per invocation instead of batching.","Run update where the working copy lives."],"tags":["phabricator","cli","argument-validation","repository-management","pull-update"],"backgroundTag":"wrong-argument-count","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}