phacility/phabricator · error · PhabricatorApplicationTransactionValidationException
The package key " " is already in use by another package…
Error message
The package key "%s" is already in use by another package provided by this publisher.
What it means
Uniqueness validation in the Packages package editor: a database duplicate-key error on the (publisher, package key) unique index was caught and translated into a user-facing validation error — another package from the same publisher already uses that key.
Solutions
- Choose a different package key for this publisher
- Rename or delete the conflicting package if the key should move
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/applications/packages/editor/PhabricatorPackagesPackageEditor.php:46 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/f416f30d9b13dac8.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/packages/editor/PhabricatorPackagesPackageEditor.php:46
return array();
}
protected function didCatchDuplicateKeyException(
PhabricatorLiskDAO $object,
array $xactions,
Exception $ex) {
$errors = array();
$errors[] = new PhabricatorApplicationTransactionValidationError(
PhabricatorPackagesPackageKeyTransaction::TRANSACTIONTYPE,
pht('Duplicate'),
pht(
'The package key "%s" is already in use by another package provided '.
'by this publisher.',
$object->getPackageKey()),
null);
throw new PhabricatorApplicationTransactionValidationException($errors);
}
}
View on GitHub (pinned to 5720a38cfe)