phacility/phabricator · error · Exception
You have no accounts!
Error message
You have no accounts!
What it means
Thrown by PhortuneChargeSearchEngine when it builds a charge query with no account context and the viewer is not a member of any Phortune account. Charge history is per-account data, so the engine refuses to run an unscoped query. The throw happens instead of showing an empty or global listing.
Source
Thrown at src/applications/phortune/query/PhortuneChargeSearchEngine.php:51
return $saved;
}
public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) {
$query = id(new PhortuneChargeQuery());
$viewer = $this->requireViewer();
$account = $this->getAccount();
if ($account) {
$query->withAccountPHIDs(array($account->getPHID()));
} else {
$accounts = id(new PhortuneAccountQuery())
->withMemberPHIDs(array($viewer->getPHID()))
->execute();
if ($accounts) {
$query->withAccountPHIDs(mpull($accounts, 'getPHID'));
} else {
throw new Exception(pht('You have no accounts!'));
}
}
return $query;
}
public function buildSearchForm(
AphrontFormView $form,
PhabricatorSavedQuery $saved_query) {}
protected function getURI($path) {
$account = $this->getAccount();
if ($account) {
return $account->getChargeListURI($path);
} else {
return '/phortune/charge/'.$path;
}
}View on GitHub (pinned to 5720a38cfe)
Solutions
- Create or join a Phortune account, then reload the charge list.
- Set an explicit account context on the engine (or a merchant context where supported) before querying.
- Pre-check PhortuneAccountQuery->withMemberPHIDs(viewer) in custom controllers and show an account-creation prompt when empty.
- Confirm the user is not hitting the page with a different/anonymous session.
Defensive patterns
Strategy: validation
Validate before calling
$accounts = id(new PhortuneAccountQuery())
->setViewer($viewer)
->withMemberPHIDs(array($viewer->getPHID()))
->execute();
if (!$accounts) {
return new Aphront404Response(); // or prompt account creation
}
// safe to build the charge query now Prevention
- Pre-check account membership before rendering charge history UI.
- Keep at least one billing account per user who needs payment visibility.
- Return a helpful prompt instead of letting the engine throw.
When it happens
Trigger: Loading the Phortune charge list (e.g. /phortune/charge/) or invoking PhortuneChargeSearchEngine's query building when getAccount() returns null and the PhortuneAccountQuery for the viewer's memberships returns no results.
Common situations: New users browsing Phortune before any account exists; users removed from their last billing account; cron jobs or panels rendering charge queries as a system viewer with no memberships.
Related errors
- You have no accounts!
- You have no accounts!
- Invalid currency format ('%s').
- Minimum allowed amount is %s.
- Maximum allowed amount is %s.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/a0e1f9c11dc79dd1.
Report an issue: GitHub.