Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-3941

PATCH via REST with operation increment with invalid value returns 500 instead of 400

    Details

    • Story Points:
      1
    • Sprint:
      OpenIDM Sprint 56

      Description

      PATCH via REST with operation increment with invalid value (we use a string instead of an integet) returns 500 instead of 400 since we use CREST 3.

      with CREST 2.x

      curl --header "Content-Type: application/json" --header "X-OpenIDM-Password: openidm-admin" --header "X-OpenIDM-Username: openidm-admin" --data '[{"operation":"increment","field":"/age","value":"9"}]' --request PATCH "http://localhost:8080/openidm/managed/user/ricksutter"
      {
        "message": "Non-numeric value provided for increment patch operation",
        "reason": "Bad Request",
        "code": 400
      }
      

      with CREST 3

      curl --header "Content-Type: application/json" --header "X-OpenIDM-Password: openidm-admin" --header "X-OpenIDM-Username: openidm-admin" --data '[{"operation":"increment","field":"/age","value":"9"}]' --request PATCH "http://localhost:8080/openidm/managed/user/ricksutter"
      

      => we get a status 500 and an empty response
      (the empty response problem is already logged in OPENIDM-3939)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                travis.haagen Travis Haagen
                Reporter:
                laurent.bristiel Laurent Bristiel [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: