phacility/phabricator · error · Exception

Publisher name " " is not valid: publisher names are…

Error message

Publisher name "%s" is not valid: publisher names are required.

What it means

Fires from the publisher-name validation helper when an empty string is submitted as a Packages publisher name. It is a sentinel-style guard called from transaction validation: the only input at fault is the name value, and the transaction is rejected before storage.

Solutions

  1. Supply a non-empty publisher name in the transaction before resubmitting
  2. Trim user input before validation so whitespace-only names are caught as empty
  3. Add a client-side required-field check on the publisher name form to avoid the round trip
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/applications/packages/storage/PhabricatorPackagesPublisher.php:60 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/544d434a50ab9a1e. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/packages/storage/PhabricatorPackagesPublisher.php:60

        ),
      ),
    ) + parent::getConfiguration();
  }

  public function generatePHID() {
    return PhabricatorPHID::generateNewPHID(
      PhabricatorPackagesPublisherPHIDType::TYPECONST);
  }

  public function getURI() {
    $publisher_key = $this->getPublisherKey();
    return "/package/{$publisher_key}/";
  }

  public static function assertValidPublisherName($value) {
    $length = phutil_utf8_strlen($value);
    if (!$length) {
      throw new Exception(
        pht(
          'Publisher name "%s" is not valid: publisher names are required.',
          $value));
    }

    $max_length = 64;
    if ($length > $max_length) {
      throw new Exception(
        pht(
          'Publisher name "%s" is not valid: publisher names must not be '.
          'more than %s characters long.',
          $value,
          new PhutilNumber($max_length)));
    }
  }

  public static function assertValidPublisherKey($value) {
    $length = phutil_utf8_strlen($value);

View on GitHub (pinned to 5720a38cfe)