{"record":{"id":"c78929d8a7f5465c","repo":"phacility/phabricator","slug":"exception-when-processing-transaction-of-type-s","errorCode":null,"errorMessage":"Exception when processing transaction of type \"%s\": %s","messagePattern":"Exception when processing transaction of type \"(.+?)\": (.+?)","errorType":"exception","errorClass":"PhutilProxyException","httpStatus":null,"severity":"error","filePath":"src/applications/transactions/editengine/PhabricatorEditEngine.php","lineNumber":2286,"sourceCode":"\n    $is_strict = $request->getIsStrictlyTyped();\n\n    foreach ($xactions as $xaction) {\n      $type = $types[$xaction['type']];\n\n      // Let the parameter type interpret the value. This allows you to\n      // use usernames in list<user> fields, for example.\n      $parameter_type = $type->getConduitParameterType();\n\n      $parameter_type->setViewer($viewer);\n\n      try {\n        $value = $xaction['value'];\n        $value = $parameter_type->getValue($xaction, 'value', $is_strict);\n        $value = $type->getTransactionValueFromConduit($value);\n        $xaction['value'] = $value;\n      } catch (Exception $ex) {\n        throw new PhutilProxyException(\n          pht(\n            'Exception when processing transaction of type \"%s\": %s',\n            $xaction['type'],\n            $ex->getMessage()),\n          $ex);\n      }\n\n      $type_xactions = $type->generateTransactions(\n        clone $template,\n        $xaction);\n\n      foreach ($type_xactions as $type_xaction) {\n        $results[] = $type_xaction;\n      }\n    }\n\n    return $results;\n  }","sourceCodeStart":2268,"sourceCodeEnd":2304,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/transactions/editengine/PhabricatorEditEngine.php#L2268-L2304","documentation":"This is a PhutilProxyException: while converting a transaction's raw 'value' through the field's Conduit parameter type (getValue) and the edit type's getTransactionValueFromConduit, an inner exception was raised. The outer message embeds the transaction type and the inner message, and the original exception stays chained for debugging.","triggerScenarios":"A 'value' that does not fit the field's parameter type: passing a single PHID/username string where list<user> expects a list; invalid priority constants; malformed epoch/date values; a bad status value; wrong element type inside a list (e.g. integers in list<phid>).","commonSituations":"Username vs PHID confusion for owner/reviewer/subscribe lists; sending raw strings like 'high'/'Low' or priority numbers that don't match the install's configured constants; locale-specific date strings; schema drift after a field's parameter type changed in an upgrade.","solutions":["Read the tail of the message after the colon — it is the real error from the parameter type and names the expected format","Use lists for user/project/PHID fields (e.g. value: [\"alice\"] — usernames are accepted inside list<user>)","Send raw epoch integers for dates, and exact configured constants for priority/status","Reproduce with a minimal one-transaction call to isolate which value is malformed"],"exampleFix":"// before: scalar where list<user> is expected\n'transactions' => array(array('type' => 'owner', 'value' => 'alice')),\n// Exception when processing transaction of type \"owner\": ...\n\n// after\n'transactions' => array(array('type' => 'owner', 'value' => array('alice'))),","handlingStrategy":"try-catch","validationCode":"// Coerce values to the expected shape client-side before sending:\n// - user/project fields: list (['alice'] or [PHID])\n// - dates: raw epoch integers\n// - priority/status: exact configured constants\nif ($type === 'owner' && is_string($value)) {\n  $value = array($value);\n}","typeGuard":"function valueMatchesTypeShape($type, $value) {\n  $listTypes = array('owner', 'projects', 'subscribers', 'reviewers', 'cc');\n  if (in_array($type, $listTypes, true)) {\n    return is_array($value);\n  }\n  return true; // scalar types accept strings/ints\n}","tryCatchPattern":"try {\n  $result = $client->callMethod('maniphest.edit', $parameters);\n} catch (ConduitClientException $ex) {\n  $msg = $ex->getMessage();\n  if (strpos($msg, 'Exception when processing transaction of type') === 0) {\n    // the text after the colon is the real cause; the offending type is named\n    // fix that one value and re-send only the failed transactions\n  } else {\n    throw $ex;\n  }\n}","preventionTips":["Always send lists for user/project/subscriber fields, epochs for dates, exact constants for enums","Split multi-transaction edits into one-transaction probe calls when debugging value errors","Read the chained inner message — it states the expected format precisely"],"tags":["phabricator","conduit","edit-engine","value-coercion","wrapped-exception"],"backgroundTag":"invalid-field-value","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}