{"record":{"id":"b44c17c898551154","repo":"phacility/phabricator","slug":"invalid-parameter-information-was-passed-to-method","errorCode":null,"errorMessage":"Invalid parameter information was passed to method '%s'.","messagePattern":"Invalid parameter information was passed to method '(.+?)'\\.","errorType":"validation","errorClass":"PhutilProxyException","httpStatus":null,"severity":"error","filePath":"src/applications/conduit/controller/PhabricatorConduitAPIController.php","lineNumber":691,"sourceCode":"        }\n        $params[$key] = $decoded_value;\n      }\n\n      $metadata = idx($params, '__conduit__', array());\n      unset($params['__conduit__']);\n\n      return array($metadata, $params, true);\n    }\n\n    // Otherwise, look for a single parameter called 'params' which has the\n    // entire param dictionary JSON encoded.\n    $params_json = $request->getStr('params');\n    if (phutil_nonempty_string($params_json)) {\n      $params = null;\n      try {\n        $params = phutil_json_decode($params_json);\n      } catch (PhutilJSONParserException $ex) {\n        throw new PhutilProxyException(\n          pht(\n            \"Invalid parameter information was passed to method '%s'.\",\n            $method),\n          $ex);\n      }\n\n      $metadata = idx($params, '__conduit__', array());\n      unset($params['__conduit__']);\n\n      return array($metadata, $params, true);\n    }\n\n    // If we do not have `params`, assume this is a simple HTTP request with\n    // HTTP key-value pairs.\n    $params = array();\n    $metadata = array();\n    foreach ($request->getPassthroughRequestData() as $key => $value) {\n      $meta_key = ConduitAPIMethod::getParameterMetadataKey($key);","sourceCodeStart":673,"sourceCodeEnd":709,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/conduit/controller/PhabricatorConduitAPIController.php#L673-L709","documentation":"When parameters come as a single 'params' POST field, Phabricator decodes its contents with phutil_json_decode(). Failure raises a PhutilProxyException whose message names the Conduit method and which wraps the underlying PhutilJSONParserException carrying the exact parse error and offset.","triggerScenarios":"curl -d 'params={\"query\":phabricator}' with an unquoted string or trailing comma; client code assembling the params string via string concatenation or printf with unescaped values; a shell mangling quotes so the body arrives truncated or altered.","commonSituations":"Hand-written curl incantations in scripts or wiki docs; clients that 'look right' but interpolate quotes incorrectly when values contain quotes or newlines.","solutions":["Build the params payload with your language's JSON encoder (json_encode/json.dumps) instead of by hand.","Inspect the wrapped PhutilJSONParserException (or run the payload through a JSON linter) to find the exact syntax offset.","Replace bespoke HTTP calls with arc call-conduit, which encodes parameters correctly."],"exampleFix":"# before\n$ curl -d 'params={\"query\":phabricator}' https://phab.example.com/api/phabricator.macro.query\n# after\n$ curl -d 'params={\"query\":\"phabricator\"}' https://phab.example.com/api/phabricator.macro.query","handlingStrategy":"validation","validationCode":"# Always build the params field with an encoder, never string templates.\nimport json\nbody = 'params=' + requests.utils.quote(json.dumps(params))\nrequests.post(url, data=body,\n              headers={'Content-Type': 'application/x-www-form-urlencoded'})","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use json.dumps/json_encode for the params payload and let the HTTP library handle form encoding.","Round-trip check before sending: json.loads(payload) must succeed.","Prefer arc call-conduit over raw curl in scripts; it encodes parameters correctly."],"tags":["conduit","json","parameters","phabricator"],"backgroundTag":"json-parse-error","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}