fix: add error handling to Settings and PlatformUser modals #32

Open
Charon wants to merge 0 commits from feat/modal-error-handling into dev
Member

Summary

  • Wrap all database operations and external calls in Settings.php and PlatformUser.php with try-catch blocks
  • Add user-friendly error messages via Flux toast (Settings) and actionMessage/actionType (PlatformUser)
  • Add structured Log::error() calls with admin/user context for every caught exception
  • Added Log facade import to Settings.php (PlatformUser already had it)

Settings.php (Issue #9)

  • updateProfile() — catches DB failures on user update
  • updatePreferences() — catches failures on Setting::updateOrCreate loop
  • updatePassword() — catches failures on password hash/update
  • requestAccountDeletion() — catches failures on deletion request creation and email send
  • cancelAccountDeletion() — catches failures on deletion cancellation

PlatformUser.php (Issue #10)

  • saveTier() — catches failures on tier enum/save
  • saveVerification() — catches failures on verification toggle/save
  • resendVerification() — catches failures on notification send
  • scheduleDelete() — catches failures on deletion request creation
  • cancelPendingDeletion() — catches failures on deletion cancellation
  • anonymizeUser() — catches failures on DB::transaction for anonymisation
  • provisionPackage() — catches failures on EntitlementService::provisionPackage
  • revokePackage() — catches failures on EntitlementService::revokePackage
  • provisionEntitlement() — catches failures on EntitlementService::provisionBoost
  • removeBoost() — catches failures on boost status update

Fixes #9
Fixes #10

## Summary - Wrap all database operations and external calls in Settings.php and PlatformUser.php with try-catch blocks - Add user-friendly error messages via Flux toast (Settings) and actionMessage/actionType (PlatformUser) - Add structured `Log::error()` calls with admin/user context for every caught exception - Added `Log` facade import to Settings.php (PlatformUser already had it) ### Settings.php (Issue #9) - `updateProfile()` — catches DB failures on user update - `updatePreferences()` — catches failures on Setting::updateOrCreate loop - `updatePassword()` — catches failures on password hash/update - `requestAccountDeletion()` — catches failures on deletion request creation and email send - `cancelAccountDeletion()` — catches failures on deletion cancellation ### PlatformUser.php (Issue #10) - `saveTier()` — catches failures on tier enum/save - `saveVerification()` — catches failures on verification toggle/save - `resendVerification()` — catches failures on notification send - `scheduleDelete()` — catches failures on deletion request creation - `cancelPendingDeletion()` — catches failures on deletion cancellation - `anonymizeUser()` — catches failures on DB::transaction for anonymisation - `provisionPackage()` — catches failures on EntitlementService::provisionPackage - `revokePackage()` — catches failures on EntitlementService::revokePackage - `provisionEntitlement()` — catches failures on EntitlementService::provisionBoost - `removeBoost()` — catches failures on boost status update Fixes #9 Fixes #10
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/modal-error-handling:feat/modal-error-handling
git checkout feat/modal-error-handling

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout dev
git merge --no-ff feat/modal-error-handling
git checkout feat/modal-error-handling
git rebase dev
git checkout dev
git merge --ff-only feat/modal-error-handling
git checkout feat/modal-error-handling
git rebase dev
git checkout dev
git merge --no-ff feat/modal-error-handling
git checkout dev
git merge --squash feat/modal-error-handling
git checkout dev
git merge --ff-only feat/modal-error-handling
git checkout dev
git merge feat/modal-error-handling
git push origin dev
Sign in to join this conversation.
No description provided.