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

Revert DocumentValidationException#getMessage behaviour change

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11.3, 2021.0
    • Component/s: Core
    • Tags:
    • Team:
      PLATFORM
    • Sprint:
      nxplatform #18
    • Story Points:
      2

      Description

      NXP-27982 introduces a behaviour change on following methods:

      • DocumentValidationException#getMessage
      • DocumentValidationReport#toString

      Before NXP-27982, those methods were using ValidationViolation#getMessage and were returning i18n messages, now they are using ValidationViolation#getMessageKey which just return a label key.

      We end up with non-meaningful messages in server logs such as:

      2020-09-15 14:35:49,683 [Nuxeo-Work-default-2:206762798789248.3235005] ERROR [CreateMajorVersion] Error creating major version of a document
      org.nuxeo.ecm.core.api.validation.DocumentValidationException: 2 constraint violation(s) thrown. First one is: 'label.schema.constraint.violation.directoryResolver.milor.brand.brand', call DocumentValidationException.getViolations() to get the others
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h