Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
16.5.0
-
None
-
Unknown
-
Description
Context
With XWIKI-24621, the watch modal (XWiki.Notifications.Code.NotificationsWatchUIX, JSX object "Handle watch settings change") handles a watch or block change that fails to be saved: it clears the selection, does not reload the page and logs an error to the browser console. Two things are still missing.
The user is not told
The failure is only logged to the console. Someone who does not open the browser developer tools sees the selection being cleared and nothing else, so they still cannot tell that their watch or block choice was not saved, short of checking the notification filter preferences in their profile.
The console message does not say what failed
console.error("Error when processing the request: " + data);
prints Error when processing the request: [object Object] for a failed request: jQuery rejects with (jqXHR, textStatus, errorThrown), and data is the jqXHR object. For the combined options ("Unwatch this page and watch the space instead" and its block equivalent), the changes are awaited one after another, which only keeps that first argument anyway.
Proposal
- Display an error notification with a translated message when the change cannot be saved.
- Log the actual reason: the HTTP status and status text of a failed request, or the message of the Error returned for an unsupported option.
Attachments
Issue Links
- relates to
-
XWIKI-24621 Notification watch settings can silently fail to be saved
-
- Open
-