{"record":{"id":"434fbb8a5c762922","repo":"phacility/phabricator","slug":"you-can-not-accept-this-revision-because-you-have","errorCode":null,"errorMessage":"You can not accept this revision because you have already accepted it.","messagePattern":"You can not accept this revision because you have already accepted it\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php","lineNumber":186,"sourceCode":"    if ($object->isDraft() || !$object->getShouldBroadcast()) {\n      throw new Exception(\n        pht('You can not accept a draft revision.'));\n    }\n\n    $config_key = 'differential.allow-self-accept';\n    if (!PhabricatorEnv::getEnvConfig($config_key)) {\n      if ($this->isViewerRevisionAuthor($object, $viewer)) {\n        throw new Exception(\n          pht(\n            'You can not accept this revision because you are the revision '.\n            'author. You can only accept revisions you do not own. You can '.\n            'change this behavior by adjusting the \"%s\" setting in Config.',\n            $config_key));\n      }\n    }\n\n    if ($this->isViewerFullyAccepted($object, $viewer)) {\n      throw new Exception(\n        pht(\n          'You can not accept this revision because you have already '.\n          'accepted it.'));\n    }\n  }\n\n  protected function validateOptionValue($object, $actor, array $value) {\n    if (!$value) {\n      throw new Exception(\n        pht(\n          'When accepting a revision, you must accept on behalf of at '.\n          'least one reviewer.'));\n    }\n\n    // NOTE: We're including reviewers who have already been accepted in this\n    // check. Legitimate users may race one another to accept on behalf of\n    // packages. If we get a form submission which includes a reviewer which\n    // someone has already accepted, that's fine. See T12757.","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php#L168-L204","documentation":"Idempotency guard inside DifferentialRevisionAcceptTransaction::validateAction(): the acting viewer is already recorded as fully accepted on this revision (isViewerFullyAccepted returns true, counting accepts on behalf of packages/projects they have authority over). Accepting again would be a no-op transaction, so the editor rejects the duplicate action rather than writing a redundant accept.","triggerScenarios":"Thrown at src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php:186 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["No action needed: your acceptance is already recorded on the revision","If you want to change your review verdict, use 'Request Changes' to switch from accepted to rejected instead of accepting again","If accepting on behalf of a package or project, verify which reviewer identity already carries the accept before retrying"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","contentChangedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}