phacility/phabricator · error · PhutilArgumentUsageException

No story exists with key

Error message

No story exists with key "%s"!

What it means

Lookup guard in the feed republish workflow: PhabricatorFeedQuery found no story with the given chronological key (or it is not visible to the executing viewer). The key syntax was accepted but does not correspond to any feed event.

Solutions

  1. Double-check the story key copied from the feed URI
  2. Verify the story has not been deleted
  3. Run the command as a privileged user if visibility could be the issue
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/feed/management/PhabricatorFeedManagementRepublishWorkflow.php:42 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/e2b5736b5bb1b880. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/feed/management/PhabricatorFeedManagementRepublishWorkflow.php:42

    $viewer = $this->getViewer();

    $key = $args->getArg('key');
    if (count($key) < 1) {
      throw new PhutilArgumentUsageException(
        pht('Specify a story key to republish.'));
    } else if (count($key) > 1) {
      throw new PhutilArgumentUsageException(
        pht('Specify exactly one story key to republish.'));
    }
    $key = head($key);

    $story = id(new PhabricatorFeedQuery())
      ->setViewer($viewer)
      ->withChronologicalKeys(array($key))
      ->executeOne();

    if (!$story) {
      throw new PhutilArgumentUsageException(
        pht('No story exists with key "%s"!', $key));
    }

    $console->writeOut("%s\n", pht('Republishing story...'));

    PhabricatorWorker::setRunAllTasksInProcess(true);

    PhabricatorWorker::scheduleTask(
      'FeedPublisherWorker',
      array(
        'key' => $key,
      ));

    $console->writeOut("%s\n", pht('Done.'));

    return 0;
  }

View on GitHub (pinned to 5720a38cfe)