{"record":{"id":"5edbe92b29165559","repo":"phacility/phabricator","slug":"parameter-s-must-contain-a-list-of-transaction-5edbe9","errorCode":null,"errorMessage":"Parameter \"%s\" must contain a list of transaction descriptions, but item with key \"%s\" is missing a \"value\" field. Each transaction must have a value field.","messagePattern":"Parameter \"(.+?)\" must contain a list of transaction descriptions, but item with key \"(.+?)\" is missing a \"value\" field\\. Each transaction must have a value field\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/transactions/editengine/PhabricatorEditEngine.php","lineNumber":2217,"sourceCode":"          pht(\n            'Parameter \"%s\" must contain a list of transaction descriptions, '.\n            'but item with key \"%s\" is not a dictionary.',\n            $transactions_key,\n            $key));\n      }\n\n      if (!array_key_exists('type', $xaction)) {\n        throw new Exception(\n          pht(\n            'Parameter \"%s\" must contain a list of transaction descriptions, '.\n            'but item with key \"%s\" is missing a \"type\" field. Each '.\n            'transaction must have a type field.',\n            $transactions_key,\n            $key));\n      }\n\n      if (!array_key_exists('value', $xaction)) {\n        throw new Exception(\n          pht(\n            'Parameter \"%s\" must contain a list of transaction descriptions, '.\n            'but item with key \"%s\" is missing a \"value\" field. Each '.\n            'transaction must have a value field.',\n            $transactions_key,\n            $key));\n      }\n    }\n\n    return $xactions;\n  }\n\n\n  /**\n   * Generate transactions which can be applied from edit actions in a Conduit\n   * request.\n   *\n   * @param ConduitAPIRequest The request.","sourceCodeStart":2199,"sourceCodeEnd":2235,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/transactions/editengine/PhabricatorEditEngine.php#L2199-L2235","documentation":"The companion check to the 'type' requirement: every dictionary in the Conduit 'transactions' list must also contain a 'value' key holding the new value for that transaction type. getRawConduitTransactions() throws this when 'value' is absent.","triggerScenarios":"Sending transactions => [{\"type\":\"title\"}] with no value; sending {\"type\":\"comment\"} intending a default; misspelling 'value' as 'data', 'val', or 'new'.","commonSituations":"Assuming optional values (comment text omitted by mistake); schema drift after renaming keys in a homegrown client wrapper; copy-paste from older API examples with different field names.","solutions":["Include an explicit 'value' in every transaction, even where the value is null or an empty list","For types with no meaningful payload, pass \"value\": null rather than omitting the key","Validate client-side that count of required keys ('type','value') is present before sending"],"exampleFix":"// before\n'transactions' => array(array('type' => 'title')),\n// Exception: ... item with key \"0\" is missing a \"value\" field.\n\n// after\n'transactions' => array(array('type' => 'title', 'value' => 'New title')),","handlingStrategy":"validation","validationCode":"foreach ($parameters['transactions'] as $i => $txn) {\n  if (!array_key_exists('value', $txn)) {\n    // add an explicit value (null / [] where meaningless) before sending\n    $parameters['transactions'][$i]['value'] = null;\n  }\n}","typeGuard":"function transactionValuePresent(array $txn) {\n  return array_key_exists('value', $txn);\n}","tryCatchPattern":"try {\n  $result = $client->callMethod('maniphest.edit', $parameters);\n} catch (ConduitClientException $ex) {\n  if (strpos($ex->getMessage(), 'missing a \"value\" field') !== false) {\n    // supply the value; the failing index is in the message\n  } else {\n    throw $ex;\n  }\n}","preventionTips":["Default missing 'value' keys to null in your wrapper rather than omitting them","Watch for 'val'/'data' typos when hand-writing payloads","Assert key sets in client tests so renames fail fast"],"tags":["phabricator","conduit","request-validation","missing-field","php"],"backgroundTag":"invalid-request-payload","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}