phacility/phabricator · error · Exception
You have no accounts!
Error message
You have no accounts!
What it means
Thrown by PhortuneSubscriptionSearchEngine when there is no merchant and no account context and the viewer is not a member of any Phortune account. Subscriptions always belong to a billing account, so with zero accounts there is nothing valid to query and the engine aborts. This mirrors the 'You have no accounts!' guard in the cart and charge engines.
Source
Thrown at src/applications/phortune/query/PhortuneSubscriptionSearchEngine.php:84
$can_edit = PhabricatorPolicyFilter::hasCapability(
$viewer,
$account,
PhabricatorPolicyCapability::CAN_EDIT);
if (!$can_edit) {
throw new Exception(
pht(
'You can not query subscriptions for an account you are not '.
'a member of.'));
}
$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) {
$merchant = $this->getMerchant();
$account = $this->getAccount();
if ($merchant) {
return $merchant->getSubscriptionListURI($path);
} else if ($account) {
return $account->getSubscriptionListURI($path);
} else {View on GitHub (pinned to 5720a38cfe)
Solutions
- Create or join a Phortune account, then reload the subscription list.
- Scope the engine to an account or merchant the viewer belongs to.
- Pre-check account membership in custom code and redirect to account creation when empty.
- Audit that the viewer is the intended user (not a logged-out or bot session).
Defensive patterns
Strategy: validation
Validate before calling
$accounts = id(new PhortuneAccountQuery())
->setViewer($viewer)
->withMemberPHIDs(array($viewer->getPHID()))
->execute();
if (!$accounts) {
return $this->newDialog()->setTitle(pht('You have no accounts!'));
}
// safe to build the subscription query Prevention
- Ensure a viewer owns or belongs to an account before showing subscription UI.
- Pass explicit account context when embedding subscription search.
- Handle the no-account case with guidance, not an exception page.
When it happens
Trigger: Loading /phortune/subscription/ (or building its query) where getMerchant() and getAccount() are both null and PhortuneAccountQuery->withMemberPHIDs(array($viewer->getPHID())) returns no rows.
Common situations: Newly registered users visiting Phortune before creating an account; accounts deleted or memberships stripped; rendering subscription panels for system/daemon viewers that own no accounts.
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/25b7fb5e431638a7.
Report an issue: GitHub.