phacility/phabricator · error · PhabricatorWorkerPermanentFailureException

The account ("%s") for this subscription ("%s") has no membe

Error message

The account ("%s") for this subscription ("%s") has no members.

What it means

Same Phortune renewal path as its sibling error, but here the payment account has no member records at all: the member list comes back empty, so there is no possible actor for the invoice cart. The worker raises PhabricatorWorkerPermanentFailureException, so the queue gives up on the task instead of retrying.

Source

Thrown at src/applications/phortune/worker/PhortuneSubscriptionWorker.php:89

        $message = pht(
          'All members of the account ("%s") for this subscription ("%s") '.
          'are disabled.',
          $account->getPHID(),
          $subscription->getPHID());
      } else if ($account->getMemberPHIDs()) {
        $message = pht(
          'Unable to load any of the members of the account ("%s") for this '.
          'subscription ("%s").',
          $account->getPHID(),
          $subscription->getPHID());
      } else {
        $message = pht(
          'The account ("%s") for this subscription ("%s") has no '.
          'members.',
          $account->getPHID(),
          $subscription->getPHID());
      }
      throw new PhabricatorWorkerPermanentFailureException($message);
    }

    $cart = $account->newCart($actor, $cart_implementation, $merchant);

    $purchase = $cart->newPurchase($actor, $product);

    $purchase
      ->setBasePriceAsCurrency($currency)
      ->setMetadataValue('subscriptionPHID', $subscription->getPHID())
      ->setMetadataValue('epoch.start', $last_epoch)
      ->setMetadataValue('epoch.end', $next_epoch)
      ->save();

    $cart
      ->setSubscriptionPHID($subscription->getPHID())
      ->setIsInvoice(1)
      ->save();

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Add at least one active member (typically an administrator) to the Phortune account that owns the subscription
  2. Cancel or delete the subscription if it is no longer wanted, so the trigger stops producing permanent failures
  3. Audit other subscriptions on the same account: they will all fail the same way until membership is restored
Defensive patterns

Strategy: validation

Validate before calling

// Refuse to attach subscriptions to memberless accounts.
$members = $account->getMemberPHIDs();
if (!$members) {
  throw new Exception(pht(
    'Account %s has no members; add one before creating a subscription.',
    $account->getPHID()));
}

Try / catch

try {
  // invoking subscription billing on behalf of an account
} catch (PhabricatorWorkerPermanentFailureException $ex) {
  if (strpos($ex->getMessage(), 'has no members') !== false) {
    // surface to an admin: the account needs a member, retries will not help
  }
}

Prevention

When it happens

Trigger: The subscription fires and the account membership query returns an empty set: the last member was removed from the account, or the account was created programmatically without attaching any members before a subscription was attached to it.

Common situations: Last account member removed during offboarding; automated account provisioning that forgot to set members; sandbox/test data reshuffles that strip membership rows.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/6e42b8b0498e8223. Report an issue: GitHub.