{"record":{"id":"b8ac970f1221071d","repo":"phacility/phabricator","slug":"request-parameter-s-is-not-formatted-properly-b8ac97","errorCode":null,"errorMessage":"Request parameter \"%s\" is not formatted properly. Expected a JSON object, but encountered a syntax error: %s.","messagePattern":"Request parameter \"(.+?)\" is not formatted properly\\. Expected a JSON object, but encountered a syntax error: (.+?)\\.","errorType":"validation","errorClass":"Exception","httpStatus":500,"severity":"error","filePath":"src/aphront/AphrontRequest.php","lineNumber":252,"sourceCode":"\n    $raw_data = phutil_string_cast($this->requestData[$name]);\n    $raw_data = trim($raw_data);\n    if (!strlen($raw_data)) {\n      return $default;\n    }\n\n    if ($raw_data[0] !== '{') {\n      throw new Exception(\n        pht(\n          'Request parameter \"%s\" is not formatted properly. Expected a '.\n          'JSON object, but value does not start with \"{\".',\n          $name));\n    }\n\n    try {\n      $json_object = phutil_json_decode($raw_data);\n    } catch (PhutilJSONParserException $ex) {\n      throw new Exception(\n        pht(\n          'Request parameter \"%s\" is not formatted properly. Expected a '.\n          'JSON object, but encountered a syntax error: %s.',\n          $name,\n          $ex->getMessage()));\n    }\n\n    return $json_object;\n  }\n\n\n  /**\n   * @task data\n   */\n  public function getArr($name, $default = array()) {\n    if (isset($this->requestData[$name]) &&\n        is_array($this->requestData[$name])) {\n      return $this->requestData[$name];","sourceCodeStart":234,"sourceCodeEnd":270,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/aphront/AphrontRequest.php#L234-L270","documentation":"Thrown by 'bin/repository thaw' when the operator supplies neither a repository list nor '--all-repositories'. The workflow must know which repositories to promote or demote, and because thaw is a destructive cluster-recovery tool it refuses to guess a default target set. Nothing has run when this is raised; it is a pure argument-selection error.","triggerScenarios":"Running 'bin/repository thaw --promote repo-004' with no trailing repository arguments and no '--all-repositories' flag: both $repository_names and $all_repositories are falsy, hitting the 'else if (!$repository_names && !$all_repositories)' branch at PhabricatorRepositoryManagementThawWorkflow.php:121.","commonSituations":"Operators used to older Phabricator versions where the command defaulted to the device's repositories; scripts built around '--promote <device>' alone; CI jobs that pass the device but construct an empty repo list variable.","solutions":["Append the repository monikers (e.g. 'bin/repository thaw --promote repo-004 R12') to target specific repositories.","Or add '--all-repositories' to affect every repository hosted on the promoted/demoted device.","Check shell scripts for unquoted/empty variables that were meant to expand into the repository list."],"exampleFix":"# before\nbin/repository thaw --promote repo-004\n\n# after\nbin/repository thaw --promote repo-004 R12\n# or\nbin/repository thaw --promote repo-004 --all-repositories","handlingStrategy":"validation","validationCode":"# Fail early when no selector is present:\nif [ -z \"$REPOS\" ] && [ \"$ALL\" != \"1\" ]; then\n  echo 'Select repositories via a list or --all-repositories.' >&2\n  exit 2\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["set -u / null checks on the repo-list variable before invoking thaw.","Keep documented example commands that always include a selector."],"tags":["phabricator","cli","missing-argument","repository-management","cluster-repositories"],"backgroundTag":"missing-required-argument","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}