phacility/phabricator · error · Exception

When accepting a revision, you must accept on behalf of at…

Error message

When accepting a revision, you must accept on behalf of at least one reviewer.

What it means

Input guard inside DifferentialRevisionAcceptTransaction::validateOptionValue: the 'accept on behalf of' value submitted with the transaction is empty. The accept workflow requires acting for at least one specific reviewer (yourself or a package/project reviewer you have authority over); an empty selection gives the transaction no reviewer to attach the accept to, so it is rejected before any effects are applied.

Solutions

  1. Select at least one reviewer (yourself, another reviewer, or a package/project you have authority over) when submitting the accept action
  2. If the action form lost your selection, reload the revision page and resubmit with the reviewer checkbox checked
  3. For API/Conduit callers, ensure the 'accept' value parameter is a non-empty list of reviewer PHIDs
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php:195 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php:195

          pht(
            'You can not accept this revision because you are the revision '.
            'author. You can only accept revisions you do not own. You can '.
            'change this behavior by adjusting the "%s" setting in Config.',
            $config_key));
      }
    }

    if ($this->isViewerFullyAccepted($object, $viewer)) {
      throw new Exception(
        pht(
          'You can not accept this revision because you have already '.
          'accepted it.'));
    }
  }

  protected function validateOptionValue($object, $actor, array $value) {
    if (!$value) {
      throw new Exception(
        pht(
          'When accepting a revision, you must accept on behalf of at '.
          'least one reviewer.'));
    }

    // NOTE: We're including reviewers who have already been accepted in this
    // check. Legitimate users may race one another to accept on behalf of
    // packages. If we get a form submission which includes a reviewer which
    // someone has already accepted, that's fine. See T12757.

    list($options) = $this->getActionOptions($actor, $object, true);
    foreach ($value as $phid) {
      if (!isset($options[$phid])) {
        throw new Exception(
          pht(
            'Reviewer "%s" is not a valid reviewer which you have authority '.
            'to accept on behalf of.',
            $phid));

View on GitHub (pinned to 5720a38cfe)