phacility/phabricator · error · Exception

You can not accept a draft revision.

Error message

You can not accept a draft revision.

What it means

Draft guard inside DifferentialRevisionAcceptTransaction::validateAction(): the revision is still in Draft status (or has not yet been promoted to broadcast with shouldBroadcast set), so reviewer actions like accept are locked. Draft revisions are hidden works-in-progress and cannot collect review decisions until the author publishes them out of draft (usually after build results or explicit promotion).

Solutions

  1. Wait for the author to publish the revision out of draft (automatic after builds pass, or via 'Request Review') before accepting
  2. If you are the author, promote the draft with Request Review so reviewers can act on it
  3. Confirm you are viewing the non-draft version of the change; drafts are visible mainly to the author until broadcast
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

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

    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.',
            $config_key));
      }
    }

    if ($this->isViewerFullyAccepted($object, $viewer)) {
      throw new Exception(
        pht(

View on GitHub (pinned to 5720a38cfe)