Skip to content

Commit

Permalink
Fix unthrown exceptions in the Apple's user data provider
Browse files Browse the repository at this point in the history
remp/crm#2729
  • Loading branch information
rootpd committed Jan 24, 2023
1 parent d532090 commit 30a2b9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Models/User/AppleAppstoreUserDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ public function canBeDeleted($userId): array
->setExcludeOldTransactions(true)
->validate();
} catch (\Exception | \GuzzleHttp\Exception\GuzzleException $e) {
new \Exception("Unable to validate Apple AppStore payment. Error: [{$e->getMessage()}]");
throw new \Exception("Unable to validate Apple AppStore payment. Error: [{$e->getMessage()}]");
}

if (!$appleResponse->isValid()) {
new \Exception("Apple appstore receipt is not valid: " . $originalTransactionRow->latest_receipt);
throw new \Exception("Apple appstore receipt is not valid: " . $originalTransactionRow->latest_receipt);
}

/** @var PendingRenewalInfo $pendingRenewalInfo */
Expand Down

0 comments on commit 30a2b9b

Please sign in to comment.