phacility/phabricator · error · Exception
Parameter "%s" must contain a list of transaction descriptio
Error message
Parameter "%s" must contain a list of transaction descriptions, but item with key "%s" is missing a "type" field. Each transaction must have a type field.
What it means
Each entry of the Conduit 'transactions' list must be a dictionary with at least a 'type' key naming the transaction type (e.g. 'title', 'priority'). getRawConduitTransactions() throws this when an item is a dictionary but has no 'type' field.
Source
Thrown at src/applications/transactions/editengine/PhabricatorEditEngine.php:2207
if (!is_array($xactions)) {
throw new Exception(
pht(
'Parameter "%s" is not a list of transactions.',
$transactions_key));
}
foreach ($xactions as $key => $xaction) {
if (!is_array($xaction)) {
throw new Exception(
pht(
'Parameter "%s" must contain a list of transaction descriptions, '.
'but item with key "%s" is not a dictionary.',
$transactions_key,
$key));
}
if (!array_key_exists('type', $xaction)) {
throw new Exception(
pht(
'Parameter "%s" must contain a list of transaction descriptions, '.
'but item with key "%s" is missing a "type" field. Each '.
'transaction must have a type field.',
$transactions_key,
$key));
}
if (!array_key_exists('value', $xaction)) {
throw new Exception(
pht(
'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.',
$transactions_key,
$key));
}
}View on GitHub (pinned to 5720a38cfe)
Solutions
- Add a 'type' key to every transaction dictionary, e.g. {"type":"title","value":"x"}
- Use exact lowercase type keys from the method docs or the error listing ('title', 'description', 'priority', 'owner', 'projects', 'subscribers', 'comment', ...)
- Validate the shape client-side: every element has both 'type' and 'value'
Example fix
// before
'transactions' => array(array('action' => 'title', 'value' => 'x')),
// Exception: ... item with key "0" is missing a "type" field.
// after
'transactions' => array(array('type' => 'title', 'value' => 'x')), Defensive patterns
Strategy: validation
Validate before calling
foreach ($parameters['transactions'] as $i => $txn) {
if (!isset($txn['type'])) {
// reject before send: every transaction needs 'type'
}
} Type guard
function hasRequiredTransactionKeys(array $txn) {
return isset($txn['type']) && array_key_exists('value', $txn);
} Try / catch
try {
$result = $client->callMethod('maniphest.edit', $parameters);
} catch (ConduitClientException $ex) {
if (strpos($ex->getMessage(), 'missing a "type" field') !== false) {
// add the type key; the failing index is in the message
} else {
throw $ex;
}
} Prevention
- Copy type keys verbatim from the method documentation; they are lowercase
- Construct transactions only through a helper that enforces type+value keys
- When porting old maniphest.update scripts, rewrite the payload shape, not just the method name
When it happens
Trigger: Sending transactions => [{"value":"x"}] (value only), or using a different key name such as 'transaction', 'action', or 'operation' instead of 'type'.
Common situations: Porting scripts from the older pre-edit-engine API (maniphest.update used 'type' at the top level with different semantics); guessing field names instead of copying them from the method documentation; typos like 'Type' (case-sensitive).
Related errors
- Parameter "%s" must contain a list of transaction descriptio
- Parameter "%s" is not a list of transactions.
- Parameter "%s" must contain a list of transaction descriptio
- Service "%s" is unrecognized, restricted, or you do not have
- Conduit API method "%s" does not exist.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/9b73537225d951c7.
Report an issue: GitHub.