phacility/phabricator · error · PhutilProxyException

Exception when processing transaction of type "%s": %s

Error message

Exception when processing transaction of type "%s": %s

What it means

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.

Source

Thrown at src/applications/transactions/editengine/PhabricatorEditEngine.php:2286

    $is_strict = $request->getIsStrictlyTyped();

    foreach ($xactions as $xaction) {
      $type = $types[$xaction['type']];

      // Let the parameter type interpret the value. This allows you to
      // use usernames in list<user> fields, for example.
      $parameter_type = $type->getConduitParameterType();

      $parameter_type->setViewer($viewer);

      try {
        $value = $xaction['value'];
        $value = $parameter_type->getValue($xaction, 'value', $is_strict);
        $value = $type->getTransactionValueFromConduit($value);
        $xaction['value'] = $value;
      } catch (Exception $ex) {
        throw new PhutilProxyException(
          pht(
            'Exception when processing transaction of type "%s": %s',
            $xaction['type'],
            $ex->getMessage()),
          $ex);
      }

      $type_xactions = $type->generateTransactions(
        clone $template,
        $xaction);

      foreach ($type_xactions as $type_xaction) {
        $results[] = $type_xaction;
      }
    }

    return $results;
  }

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Read the tail of the message after the colon — it is the real error from the parameter type and names the expected format
  2. Use lists for user/project/PHID fields (e.g. value: ["alice"] — usernames are accepted inside list<user>)
  3. Send raw epoch integers for dates, and exact configured constants for priority/status
  4. Reproduce with a minimal one-transaction call to isolate which value is malformed

Example fix

// before: scalar where list<user> is expected
'transactions' => array(array('type' => 'owner', 'value' => 'alice')),
// Exception when processing transaction of type "owner": ...

// after
'transactions' => array(array('type' => 'owner', 'value' => array('alice'))),
Defensive patterns

Strategy: try-catch

Validate before calling

// Coerce values to the expected shape client-side before sending:
// - user/project fields: list (['alice'] or [PHID])
// - dates: raw epoch integers
// - priority/status: exact configured constants
if ($type === 'owner' && is_string($value)) {
  $value = array($value);
}

Type guard

function valueMatchesTypeShape($type, $value) {
  $listTypes = array('owner', 'projects', 'subscribers', 'reviewers', 'cc');
  if (in_array($type, $listTypes, true)) {
    return is_array($value);
  }
  return true; // scalar types accept strings/ints
}

Try / catch

try {
  $result = $client->callMethod('maniphest.edit', $parameters);
} catch (ConduitClientException $ex) {
  $msg = $ex->getMessage();
  if (strpos($msg, 'Exception when processing transaction of type') === 0) {
    // the text after the colon is the real cause; the offending type is named
    // fix that one value and re-send only the failed transactions
  } else {
    throw $ex;
  }
}

Prevention

When it happens

Trigger: 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>).

Common situations: 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.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/c78929d8a7f5465c. Report an issue: GitHub.