feat: update user roles and passwords in QA driver, enhance documentation with error codes, and improve trial activation error handling
This commit is contained in:
@@ -71,9 +71,12 @@ class SubscriptionService
|
||||
throw new AppException(ErrorCodes::ERR_NOT_FOUND_001, null, 500);
|
||||
}
|
||||
|
||||
// Deactivating the trial period is a normal admin configuration, not a
|
||||
// broken install — surface it as "trial disabled", the same 422 the
|
||||
// trial_enabled flag produces, rather than a 500.
|
||||
$trialPeriod = $this->periodRepo->findTrialPeriodForPlan($basicPlan);
|
||||
if ($trialPeriod === null) {
|
||||
throw new AppException(ErrorCodes::ERR_NOT_FOUND_001, null, 500);
|
||||
throw new AppException(ErrorCodes::ERR_TRIAL_DISABLED, null, 422);
|
||||
}
|
||||
|
||||
$expiresAt = $this->calculateExpiresAt(null, $trialPeriod->getDurationMonths());
|
||||
|
||||
Reference in New Issue
Block a user