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

Return 400-class error if there is a Validation error when creating/updating doc via REST

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 10.10, 11.x
    • Fix Version/s: None
    • Component/s: Rest API
    • Tags:
    • Backlog priority:
      700
    • Sprint:
      CB Sprint 2

      Description

      If a POST is done to an endpoint (to create a document) a Constraint violation should not cause a 500-class error to be returned, return instead a 400-class error

      Example
      curl -X POST -H 'Content-Type: application/json' -u Administrator:Administrator -d '{"entity-type": "document", "name": "myNewDoc", "type": "File", "properties": {"dc:title": "My new doc", "dc:description":"NCDDzcd7yABohO6tZojNPCun5kSc4Ksamuhr75saKu4Usvyy9LOotySON0Bv6Hi1zLfxmGR7j8u1uaMXHDLgnThowv6RCl5ilkP2Nb1SXcl1oiptngxHL0bkfOct0YtQh0m4z091jlqPop6zB6GVa2u2HbKy0KVwDEXcddcdbvIcEI9mePm3m6Vb3JUPLMjc8wa8kIEwE802vRjytETQHbm2IpZ3VIDUOLuQoLJlXqsatk4vRayJ4iB7kDEBGOC7ii3zt9VJAu7owGjwaM2yXZ0bWTXzI9cntoE903b4HzTnsWk1zTVgDaJVSs4DzG0pD7pMjFGJHS9D8RUuzHnXmOhk06WDv5eGPPGlMoAJMtowyrREzkfpFiO1HPIvB2ZkaER5t3FEECHHsXLCDRhvk5Wx7vOugk2zahSNUPyRmGGtikKdIw00vLMcrlojWGQR4ZsOFdexYsYFGk8rzpXCLSuygd1huEdlC6M5rQtb0UvW2XRVkppSp4a07uZErZJyTBqX69MGrrG5vgbp2udlnbZTRiF4CUzkKieXBWHTRlBzzpbsUEN7DO2ja8Y5vDVPN9VTG1q5MrKEExI2bfOM33Fp2vRbi1iThEZUGOzfnnohL63eVCKFR4bjTdKnSbezWkazNZyysdfEjmrQ0E0cRcGRBc2J6VBsf7PoM4tM1PhzgJm90RYRi6Cn1pWWQCWmRdvynqub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nI7R9OxjfxvEbpqJ6404XfRLqjA6OI0GM9g6Wi4du7fCnuHg2M7uh2xpbOpFso4leV9ShrMEPWUUFdEUbbVUwn4rZ9IhhxAZqIJShA14DGOihh0ibSBLQiTYzIPVTGEPezYvWJBBaNVkaIOMLMMkPOFnSCHKI76TWW94uVr2w3viy7ob1I5dtc0Tchhcrzcd7yABohO6tZo"}}' http://localhost:8080/nuxeo/api/v1/path/default-domain
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: