{"record":{"id":"abf8cdf007b5f9e7","repo":"phacility/phabricator","slug":"expected-r-n-or-after-multipart-data-bound","errorCode":null,"errorMessage":"Expected \"\\r\\n\" or \"--\" after multipart data boundary.","messagePattern":"Expected \"\\\\r\\\\n\" or \"--\" after multipart data boundary\\.","errorType":"validation","errorClass":"Exception","httpStatus":500,"severity":"warning","filePath":"src/aphront/multipartparser/AphrontMultipartParser.php","lineNumber":102,"sourceCode":"\n            $this->part = null;\n            break;\n          }\n\n          if (!strncmp($this->buffer, \"\\r\\n\", 2)) {\n            // This is \"\\r\\n\" after a boundary, so we're going to going to\n            // read the headers for a part.\n            $this->buffer = substr($this->buffer, 2);\n            $this->state = 'header';\n\n            // Create the object to hold the part we're about to read.\n            $part = new AphrontMultipartPart();\n            $this->parts[] = $part;\n            $this->part = $part;\n            break;\n          }\n\n          throw new Exception(\n            pht('Expected \"\\r\\n\" or \"--\" after multipart data boundary.'));\n        case 'header':\n          // We've just parsed a boundary, followed by \"\\r\\n\". We are going\n          // to read the headers for this part. They are in the form of HTTP\n          // headers and terminated by \"\\r\\n\". The section is terminated by\n          // a line with no header on it.\n\n          if (strlen($this->buffer) < 2) {\n            // We don't have enough data to find a \"\\r\\n\", so wait for more.\n            $continue = false;\n            break;\n          }\n\n          if (!strncmp(\"\\r\\n\", $this->buffer, 2)) {\n            // This line immediately began \"\\r\\n\", so we're done with parsing\n            // headers. Start parsing the body.\n            $this->buffer = substr($this->buffer, 2);\n            $this->state = 'body';","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/aphront/multipartparser/AphrontMultipartParser.php#L84-L120","documentation":"Thrown by 'bin/repository unpublish' when the operator declines the confirmation prompt. Unpublishing permanently deletes feed stories and notifications generated during repository import, so without '--force' the command asks 'Permanently unpublish \"%s\"?' and a 'no' answer aborts with this PhutilArgumentUsageException. Nothing was deleted when this is thrown.","triggerScenarios":"Running 'bin/repository unpublish R12' without '--force' and answering 'n' at line 55; in non-interactive contexts the prompt reads EOF and counts as declined.","commonSituations":"Operators exploring what unpublish does; cron jobs calling unpublish without '--force' so stdin EOF aborts it; hesitation after reading the 'can not be undone' warning.","solutions":["Re-run and answer 'y' once you are sure the import notifications should be removed.","For automation, add '--force': 'bin/repository unpublish R12 --force' (optionally with '--dry-run' first to preview scope).","Use '--dry-run' to review 'Will unpublish N commits' output before committing to the destructive run."],"exampleFix":"# before (interactive, declined)\nbin/repository unpublish R12\n\n# after\bin/repository unpublish R12 --dry-run   # preview\nbin/repository unpublish R12 --force      # execute","handlingStrategy":"try-catch","validationCode":"# Preview then execute explicitly:\nbin/repository unpublish \"$REPO\" --dry-run\nbin/repository unpublish \"$REPO\" --force","typeGuard":null,"tryCatchPattern":"try {\n  // exec of bin/repository unpublish\n} catch (PhutilArgumentUsageException $ex) {\n  if (preg_match('/aborted/', $ex->getMessage())) { /* operator cancelled; nothing deleted */ }\n  throw $ex;\n}","preventionTips":["Use --dry-run before the destructive run to see the commit count.","Automation must pass --force; interactive review belongs with humans."],"tags":["phabricator","cli","confirmation-prompt","unpublish","feed"],"backgroundTag":"confirmation-aborted","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}