phacility/phabricator · error · Exception
No exclusion value for path
Error message
No exclusion value for path "%s"!
What it means
Raised in PhabricatorOwnersPathsController::handleRequest during form post processing: the submitted path row's key exists in 'path' but not in the 'exclude' array, so the form data is inconsistent. The invalid input is the truncated/missing exclude entry for that path index.
Solutions
- Include an exclude (checkbox) value for every path row in the POST
- Use the normal UI form so all parallel arrays stay aligned
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at src/applications/owners/controller/PhabricatorOwnersPathsController.php:38 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/669d2f18a3646ab5.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/owners/controller/PhabricatorOwnersPathsController.php:38
return new Aphront404Response();
}
if ($request->isFormPost()) {
$paths = $request->getArr('path');
$repos = $request->getArr('repo');
$excludes = $request->getArr('exclude');
$path_refs = array();
foreach ($paths as $key => $path) {
if (!isset($repos[$key]) || !strlen($repos[$key])) {
throw new Exception(
pht(
'No repository PHID for path "%s"!',
$key));
}
if (!isset($excludes[$key])) {
throw new Exception(
pht(
'No exclusion value for path "%s"!',
$key));
}
$path_refs[] = array(
'repositoryPHID' => $repos[$key],
'path' => $path,
'excluded' => (int)$excludes[$key],
);
}
$type_paths = PhabricatorOwnersPackagePathsTransaction::TRANSACTIONTYPE;
$xactions = array();
$xactions[] = id(new PhabricatorOwnersPackageTransaction())
->setTransactionType($type_paths)
->setNewValue($path_refs);View on GitHub (pinned to 5720a38cfe)