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

Throw an error if an invalid body is used in a REST call

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 10.10-HF15, 11.1
    • Component/s: Rest API
    • Tags:
    • Backlog priority:
      500
    • Upgrade notes:
      Hide

      Resolved in HF15

      Show
      Resolved in HF15
    • Sprint:
      CB Sprint 5, CB Sprint 6
    • Story Points:
      3

      Description

      Steps to reproduce

      1. Create a File document and populate the files:files metadata with some items
      2. Make the following REST call to update the newly created document - change the id in the URL
        HTTP PUT http://localhost:8080/nuxeo/api/v1/id/6733ed51-e6fa-4b37-9b8d-9f10413b5da9
        
        {
            "entity-type": "document",
            "type": "File",
            "properties": {
                "dc:subjects": [
                    "art/architecture"
                ]
            }
        }
        
      3. observe, in the UI or in the REST response, that the files:files metadata is now empty

      The problem is due to an incorrect JSON body, where the uid is missing.

      However an incorrect body should raise an error, not provoke a data loss

      Expected behavior: return an error to inform the user that the request is invalid (JSON body invalid)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.