This issue has been created
There are 2 updates.
 
 
Release Notes Application / cid:jira-generated-image-avatar-4cb3f9ee-cb3d-4c4a-b529-9135037e8904 RN-132 Open

Refuse an invalid release note or change with a dedicated ReleaseNotesInvalidException

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-0e3d57f1-f8d4-40a9-bd80-e543264bcfd0 Vincent Massol created this issue on 30/Sep/26 16:23
 
Summary: Refuse an invalid release note or change with a dedicated ReleaseNotesInvalidException
Issue Type: cid:jira-generated-image-avatar-4cb3f9ee-cb3d-4c4a-b529-9135037e8904 Improvement
Assignee: Unassigned
Components: Application
Created: 30/Sep/26 16:23
Priority: cid:jira-generated-image-static-major-17619443-fad6-4b91-b769-9948b8171f26 Major
Reporter: Vincent Massol
Description:

The script service ($services.releasenotes) and the REST endpoints both refuse a release note with no version, a change with no title, and a release note or change with no product in a wiki that has no default product. Today:

  • the REST endpoints check these by hand before calling the API, with their own messages, and the managers check them again;
  • the script service and the Java API throw a plain ReleaseNotesException, which a caller cannot tell apart from a failure of the wiki (a store error, a cancelled save).

Add org.xwiki.contrib.releasenotes.ReleaseNotesInvalidException (a ReleaseNotesException), thrown by the API for input it refuses, and have the REST exception mapper answer it with a 400. A script can then tell "what I sent is wrong" from "the wiki failed", and the REST endpoints stop duplicating the API's checks.

 
 

2 updates

 
cid:jira-generated-image-avatar-0e3d57f1-f8d4-40a9-bd80-e543264bcfd0 Changes by Vincent Massol on 30/Sep/26 16:23
 
Fix Version: 2.8
Assignee: Vincent Massol