{"record":{"id":"4fe43729aa8d8867","repo":"phacility/phabricator","slug":"err-wrong-user","errorCode":"ERR_WRONG_USER","errorMessage":"ERR_WRONG_USER","messagePattern":"ERR_WRONG_USER","errorType":"error_code","errorClass":"ConduitException","httpStatus":null,"severity":"error","filePath":"src/applications/flag/conduit/FlagDeleteConduitAPIMethod.php","lineNumber":41,"sourceCode":"\n  protected function defineErrorTypes() {\n    return array(\n      'ERR_NOT_FOUND'  => pht('Bad flag ID.'),\n      'ERR_WRONG_USER' => pht('You are not the creator of this flag.'),\n      'ERR_NEED_PARAM' => pht('Must pass an id or an objectPHID.'),\n    );\n  }\n\n  protected function execute(ConduitAPIRequest $request) {\n    $id = $request->getValue('id');\n    $object = $request->getValue('objectPHID');\n    if ($id) {\n      $flag = id(new PhabricatorFlag())->load($id);\n      if (!$flag) {\n        throw new ConduitException('ERR_NOT_FOUND');\n      }\n      if ($flag->getOwnerPHID() != $request->getUser()->getPHID()) {\n        throw new ConduitException('ERR_WRONG_USER');\n      }\n    } else if ($object) {\n      $flag = id(new PhabricatorFlag())->loadOneWhere(\n        'objectPHID = %s AND ownerPHID = %s',\n        $object,\n        $request->getUser()->getPHID());\n      if (!$flag) {\n        return null;\n      }\n    } else {\n      throw new ConduitException('ERR_NEED_PARAM');\n    }\n    $this->attachHandleToFlag($flag, $request->getUser());\n    $ret = $this->buildFlagInfoDictionary($flag);\n    $flag->delete();\n    return $ret;\n  }\n","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/flag/conduit/FlagDeleteConduitAPIMethod.php#L23-L59","documentation":"Error \"ERR_WRONG_USER\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/flag/conduit/FlagDeleteConduitAPIMethod.php:41 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}