Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-29983

Improve constraint violation error message in REST API

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 10.10-HF39, 11.5, 2021.1
    • Component/s: Rest API
    • Release Notes Summary:
      The constraint violation displays an error with the implied property.
    • Tags:
    • Backlog priority:
      700
    • Sprint:
      CB Sprint 6
    • Story Points:
      2

      Description

      When using the Nuxeo REST API document resource endpoints to create a document that contains a property with a constraint, the error message returned when the constraint is violated does not contain the name of the property, which makes it difficult to understand which constraint is violated if the document has multiple properties with a constraint.

      Current error message reported in the JSON response:

      Constraint violation thrown: 'This property cannot contain more than 64 character(s).'
      

      Expected error message:

      Constraint violation thrown: 'Property PROPERTY_NAME_HERE cannot contain more than 64 character(s).'
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: