{"record":{"id":"a94900c3152f5e16","repo":"phacility/phabricator","slug":"unsupported-action-s","errorCode":null,"errorMessage":"Unsupported action \"%s\".","messagePattern":"Unsupported action \"(.+?)\"\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/differential/conduit/DifferentialCreateCommentConduitAPIMethod.php","lineNumber":80,"sourceCode":"      'reject' => DifferentialRevisionRejectTransaction::TRANSACTIONTYPE,\n      'resign' => DifferentialRevisionResignTransaction::TRANSACTIONTYPE,\n      'request_review' =>\n        DifferentialRevisionRequestReviewTransaction::TRANSACTIONTYPE,\n      'rethink' => DifferentialRevisionPlanChangesTransaction::TRANSACTIONTYPE,\n    );\n\n    $action = $request->getValue('action');\n    if (isset($modular_map[$action])) {\n      $xactions[] = id(new DifferentialTransaction())\n        ->setTransactionType($modular_map[$action])\n        ->setNewValue(true);\n    } else if ($action) {\n      switch ($action) {\n        case 'comment':\n        case 'none':\n          break;\n        default:\n          throw new Exception(\n            pht(\n              'Unsupported action \"%s\".',\n              $action));\n          break;\n      }\n    }\n\n    $content = $request->getValue('message');\n    if (strlen($content)) {\n      $xactions[] = id(new DifferentialTransaction())\n        ->setTransactionType(PhabricatorTransactions::TYPE_COMMENT)\n        ->attachComment(\n          id(new DifferentialTransactionComment())\n            ->setContent($content));\n    }\n\n    // NOTE: The legacy \"attach_inlines\" flag is now ignored and has no\n    // effect. See T13513.","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/differential/conduit/DifferentialCreateCommentConduitAPIMethod.php#L62-L98","documentation":"differential.createcomment validates its action parameter against a fixed map: 'accept', 'reject', 'resign', 'request_review' and 'rethink' map to modular revision transactions, while 'comment' and 'none' mean 'post the message only'. Any other non-empty action throws a plain Exception with the message 'Unsupported action \"%s\".', which Conduit reports as a generic call error carrying that text (there is no dedicated ERR_ code for it).","triggerScenarios":"Sending action values such as 'abandon', 'claim', 'plan_changes', 'request-review', 'Accept', or any string not in {accept, reject, resign, request_review, rethink, comment, none} while also sending a non-empty message.","commonSituations":"Scripts written against pre-modular Phabricator where extra actions existed; copy-pasting action names from the web UI; hyphen-vs-underscore or case mismatches; client code defaulting the action to something like 'comment_or_none' when no action is intended.","solutions":["Use only the supported actions: accept, reject, resign, request_review, rethink, comment, none - or omit action entirely when only posting a message","For abandon/close behavior use differential.closerevision or differential.revision.edit transactions instead","Normalize the value before sending: lowercase, underscores instead of hyphens","If you inherited an old script, audit every action literal it can emit"],"exampleFix":"// before\n$params = array(\n  'revision_id' => 456,\n  'action' => 'plan_changes',\n  'message' => 'Please rework this.',\n);\n\n// after\n$params = array(\n  'revision_id' => 456,\n  'action' => 'rethink',\n  'message' => 'Please rework this.',\n);","handlingStrategy":"validation","validationCode":"$allowed = array(\n  'accept', 'reject', 'resign',\n  'request_review', 'rethink', 'comment', 'none',\n);\nif ($action !== null && $action !== ''\n    && !in_array(strtolower($action), $allowed, true)) {\n  throw new InvalidArgumentException('Unsupported action: '.$action);\n}","typeGuard":null,"tryCatchPattern":"try {\n  $client->callMethodSynchronous('differential.createcomment', $params);\n} catch (ConduitClientException $ex) {\n  if (strpos($ex->getMessage(), 'Unsupported action') !== false) {\n    // fall back to a plain comment (drop the action)\n    unset($params['action']);\n    $client->callMethodSynchronous('differential.createcomment', $params);\n  } else {\n    throw $ex;\n  }\n}","preventionTips":["Keep the allowed action list next to the caller and validate before every send","Normalize to lowercase with underscores before comparing","Comment-only flows should omit action entirely"],"tags":["phabricator","conduit","differential","action","invalid-parameter"],"backgroundTag":"invalid-parameter-value","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}