Page MenuHomePhabricator

D20613.diff
No OneTemporary

D20613.diff

diff --git a/src/applications/phortune/worker/PhortuneSubscriptionWorker.php b/src/applications/phortune/worker/PhortuneSubscriptionWorker.php
--- a/src/applications/phortune/worker/PhortuneSubscriptionWorker.php
+++ b/src/applications/phortune/worker/PhortuneSubscriptionWorker.php
@@ -48,12 +48,15 @@
->withPHIDs($account->getMemberPHIDs())
->execute();
$actor = null;
+
+ $any_disabled = false;
foreach ($members as $member) {
// Don't act as a disabled user. If all of the users on the account are
// disabled this means we won't charge the subscription, but that's
// probably correct since it means no one can cancel or pay it anyway.
if ($member->getIsDisabled()) {
+ $any_disabled = true;
continue;
}
@@ -63,7 +66,26 @@
}
if (!$actor) {
- throw new Exception(pht('Failed to load actor to bill subscription!'));
+ if ($any_disabled) {
+ $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);

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 11:00 AM (13 h, 32 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6793749
Default Alt Text
D20613.diff (1 KB)

Event Timeline