This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-b5125282-2762-4eb0-bb77-f7238cef579b XWIKI-25264 Open

Tell the user when the notification watch settings cannot be saved

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-37ebd46e-24a6-4d93-9271-aa244211d741 Vincent Massol created this issue on 11/Oct/26 21:40
 
Summary: Tell the user when the notification watch settings cannot be saved
Issue Type: cid:jira-generated-image-avatar-b5125282-2762-4eb0-bb77-f7238cef579b Improvement
Affects Versions: 16.5.0
Assignee: Unassigned
Components: Notifications
Created: 11/Oct/26 21:40
Priority: cid:jira-generated-image-static-minor-07931ef5-1718-447c-84c0-420609f5ffd4 Minor
Reporter: Vincent Massol
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.