phacility/phabricator · error · ConduitException

ERR_NEED_PARAM

ERR_NEED_PARAM

Error message

ERR_NEED_PARAM

What it means

Conduit error ERR_NEED_PARAM from flag.delete: neither 'id' nor 'objectPHID' was supplied in the request, so there is no way to identify which flag to delete. execute() raises this until one parameter is provided.

Solutions

  1. Pass exactly one of id or objectPHID in the conduit request
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/flag/conduit/FlagDeleteConduitAPIMethod.php:52 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/68bdd8356abfd607. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/flag/conduit/FlagDeleteConduitAPIMethod.php:52

    $object = $request->getValue('objectPHID');
    if ($id) {
      $flag = id(new PhabricatorFlag())->load($id);
      if (!$flag) {
        throw new ConduitException('ERR_NOT_FOUND');
      }
      if ($flag->getOwnerPHID() != $request->getUser()->getPHID()) {
        throw new ConduitException('ERR_WRONG_USER');
      }
    } else if ($object) {
      $flag = id(new PhabricatorFlag())->loadOneWhere(
        'objectPHID = %s AND ownerPHID = %s',
        $object,
        $request->getUser()->getPHID());
      if (!$flag) {
        return null;
      }
    } else {
      throw new ConduitException('ERR_NEED_PARAM');
    }
    $this->attachHandleToFlag($flag, $request->getUser());
    $ret = $this->buildFlagInfoDictionary($flag);
    $flag->delete();
    return $ret;
  }

}

View on GitHub (pinned to 5720a38cfe)