Uploaded image for project: 'Release Notes Application'
  1. Release Notes Application
  2. RN-132

Refuse an invalid release note or change with a dedicated ReleaseNotesInvalidException

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Fix
    • Major
    • None
    • None
    • Application
    • None
    • Unknown

    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.

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: