phacility/phabricator · error · ConduitException

ERR_BAD_PASTE

ERR_BAD_PASTE

Error message

No such paste exists.

What it means

Conduit error ERR_BAD_PASTE from paste.info: the paste_id parameter does not match any paste visible to the caller via PhabricatorPasteQuery. The invalid input is the nonexistent or inaccessible paste ID.

Solutions

  1. Verify the paste ID exists
  2. Check the conduit user can see the paste
  3. Confirm the paste was not deleted
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/paste/conduit/PasteInfoConduitAPIMethod.php:45 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/b216965a0bb9c31c. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/paste/conduit/PasteInfoConduitAPIMethod.php:45

  protected function defineReturnType() {
    return 'nonempty dict';
  }

  protected function defineErrorTypes() {
    return array(
      'ERR_BAD_PASTE' => pht('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);
  }

}

View on GitHub (pinned to 5720a38cfe)