'required id', ); } public function defineReturnType() { return 'nonempty dict'; } public function defineErrorTypes() { return array( 'ERR_BAD_PASTE' => 'No such paste exists', ); } protected function execute(ConduitAPIRequest $request) { $paste_id = $request->getValue('paste_id'); $paste = id(new PhabricatorPasteQuery()) ->setViewer($request->getUser()) ->withIDs(array($paste_id)) ->needRawContent(true) ->executeOne(); if (!$paste) { throw new ConduitException('ERR_BAD_PASTE'); } return $this->buildPasteInfoDictionary($paste); } }