phacility/phabricator · error · Exception
Transaction with key "%s" has invalid type "%s". This type i
Error message
Transaction with key "%s" has invalid type "%s". This type is not recognized. Valid types are: %s.
What it means
In getConduitTransactions(), each transaction's 'type' must be one of the edit types the engine's current form/fields expose for the acting viewer. The key is looked up in the $types map; an unknown key throws this exception, and helpfully the message lists every valid type name.
Source
Thrown at src/applications/transactions/editengine/PhabricatorEditEngine.php:2254
* @param list<wild> Raw conduit transactions.
* @param list<PhabricatorEditType> Supported edit types.
* @param PhabricatorApplicationTransaction Template transaction.
* @return list<PhabricatorApplicationTransaction> Generated transactions.
* @task conduit
*/
private function getConduitTransactions(
ConduitAPIRequest $request,
array $xactions,
array $types,
PhabricatorApplicationTransaction $template) {
$viewer = $request->getUser();
$results = array();
foreach ($xactions as $key => $xaction) {
$type = $xaction['type'];
if (empty($types[$type])) {
throw new Exception(
pht(
'Transaction with key "%s" has invalid type "%s". This type is '.
'not recognized. Valid types are: %s.',
$key,
$type,
implode(', ', array_keys($types))));
}
}
if ($this->getIsCreate()) {
$results[] = id(clone $template)
->setTransactionType(PhabricatorTransactions::TYPE_CREATE);
}
$is_strict = $request->getIsStrictlyTyped();
foreach ($xactions as $xaction) {
$type = $types[$xaction['type']];View on GitHub (pinned to 5720a38cfe)
Solutions
- Read the exception message: it enumerates the exact valid types for this editor — use one of those strings verbatim
- Common Maniphest types: title, description, priority, owner, status, projects, subscribers, comment, file, parents, subtasks, subtype, cover
- If a type you expect is missing, check that the corresponding field is enabled on the form used by the viewer (EditEngine form configuration)
- After upgrading Phabricator, re-run one probe edit per type to detect renamed/removed types early
Example fix
// before
'transactions' => array(array('type' => 'assignee', 'value' => 'alice')),
// Exception: Transaction with key "0" has invalid type "assignee" ...
// after
'transactions' => array(array('type' => 'owner', 'value' => array('alice'))), Defensive patterns
Strategy: validation
Validate before calling
// Keep an allow-list per editor and check before sending:
$valid_maniphest_types = array(
'title', 'description', 'priority', 'owner', 'status',
'projects', 'subscribers', 'comment', 'file', 'parents',
'subtasks', 'subtype', 'points', 'cover',
);
foreach ($parameters['transactions'] as $txn) {
if (!in_array($txn['type'], $valid_maniphest_types, true)) {
// unknown type: drop it or fail loudly before the call
}
} Type guard
function isKnownEditType($type, array $allowed) {
return is_string($type) && isset($allowed[$type]);
} Try / catch
try {
$result = $client->callMethod('maniphest.edit', $parameters);
} catch (ConduitClientException $ex) {
if (strpos($ex->getMessage(), 'has invalid type') !== false) {
// the message lists every valid type; log it and fix the payload
} else {
throw $ex;
}
} Prevention
- The exception message is the documentation: it enumerates valid types — read it before guessing
- After Phabricator upgrades, run a probe edit per type your scripts use
- Check the edit form configuration when a formerly valid type disappears — a disabled field removes its type
When it happens
Trigger: Calling maniphest.edit with 'type' => 'assignee' (not a type; the real key is 'owner'), using transaction type names from a different application's editor, or using a type whose field is disabled/hidden on the default form for that viewer.
Common situations: Porting scripts between Phabricator versions or between applications (each engine has its own type vocabulary); custom forms that removed a field (its type then disappears); guessing type names instead of copying them.
Related errors
- Service type "%s" is unrecognized. Valid types are: %s.
- Transaction value when deleting Almanac properties must be a
- Transaction value when setting Almanac properties must be a
- When creating a new Drydock blueprint via the Conduit API, y
- Parameter "constraints" must be a map of constraints, got "%
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/6ab15389663391e4.
Report an issue: GitHub.