phacility/phabricator · error · Exception

You can not accept this revision because it has already…

Error message

You can not accept this revision because it has already been closed. Only open revisions can be accepted.

What it means

State-machine guard inside DifferentialRevisionAcceptTransaction::validateAction(): the accept action is rejected because the revision is in a closed status (published/landed or abandoned). Accepting a review only makes sense while the revision is open, so once the status is closed the accept transition is permanently disallowed.

Solutions

  1. Check the revision status; if it has already been accepted and closed by landing, the review is complete and no accept is needed
  2. If code changed after closure, request a new revision or reopen the discussion with the author rather than accepting the closed one
  3. Ensure you are operating on the intended revision (correct D-id) since stale UI pages often offer actions that are no longer valid
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php:162 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/31c88497627275fc. Report an issue: GitHub.

Appendix: source

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

      array_select_keys($options, $tail);

    return array($options, $value);
  }

  public function generateOldValue($object) {
    $actor = $this->getActor();
    return $this->isViewerFullyAccepted($object, $actor);
  }

  public function applyExternalEffects($object, $value) {
    $status = DifferentialReviewerStatus::STATUS_ACCEPTED;
    $actor = $this->getActor();
    $this->applyReviewerEffect($object, $actor, $value, $status);
  }

  protected function validateAction($object, PhabricatorUser $viewer) {
    if ($object->isClosed()) {
      throw new Exception(
        pht(
          'You can not accept this revision because it has already been '.
          'closed. Only open revisions can be accepted.'));
    }

    if ($object->isDraft() || !$object->getShouldBroadcast()) {
      throw new Exception(
        pht('You can not accept a draft revision.'));
    }

    $config_key = 'differential.allow-self-accept';
    if (!PhabricatorEnv::getEnvConfig($config_key)) {
      if ($this->isViewerRevisionAuthor($object, $viewer)) {
        throw new Exception(
          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.',

View on GitHub (pinned to 5720a38cfe)