fix(installer): clear message when re-installing over an existing admin email#190
Conversation
…in email createAdminUser() re-threw the raw PDOException on a duplicate utenti.email, so re-running the installer against a database that survived while the .installed marker was lost (failed-install retry, DB restore without the marker, docroot/marker mishap) surfaced a raw SQL error. Catch the duplicate key (SQLSTATE 23000 / 'Duplicate entry') and throw a clear, localized message pointing at the real cause. New i18n key added to all four locales.
|
Warning Review limit reached
More reviews will be available in 36 minutes and 39 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
While building the Docker image (headless install), an adversarial review surfaced that the installer's
createAdminUser()re-throws the raw PDOException whenutenti.emailalready exists.When it bites (main app): re-running the installer against a database that survived while the
.installedmarker was lost — a failed-install retry, a DB restore without the marker, or a docroot/marker mishap. The wizard then shows a raw SQL error instead of something actionable. (In Docker this is the normal recreate lifecycle, handled separately in the pinakes-docker image; this PR hardens the upstream installer too.)Fix: catch the duplicate-key (
SQLSTATE 23000/Duplicate entry) and throw a clear, localized message ("A user with the email %s already exists…"). New i18n key added to all four locales (it/en/fr/de) in the same commit. No change to the happy path.PHPStan L5 clean.