Skip to content

fix(settings): report failures of the admin email toggle - #2911

Open
solracsf wants to merge 1 commit into
masterfrom
fix/settings-email-toggle-feedback
Open

fix(settings): report failures of the admin email toggle#2911
solracsf wants to merge 1 commit into
masterfrom
fix/settings-email-toggle-feedback

Conversation

@solracsf

@solracsf solracsf commented Sep 7, 2026

Copy link
Copy Markdown
Member

OCP.AppConfig.setValue() dispatches asynchronously and reports failures through its error callback, never by throwing, so the try/catch around it could not fire. The success toast was shown unconditionally and before the request had even completed — including when it failed outright, or when password confirmation was declined.

Now wired to the success and error callbacks, with the optimistic mutation rolled back when the write doesn't land so the toggle keeps matching the server.

`OCP.AppConfig.setValue()` dispatches asynchronously and reports failures
through its error callback, never by throwing, so the try/catch around it
could not fire. The success toast was shown unconditionally and before the
request had even completed - including when it failed outright or when
password confirmation was declined.

It now uses the success and error callbacks, and rolls the optimistic
mutation back when the write does not land, so the toggle keeps matching
the server.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant