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

creating managed object with an array property using string fails with status 500 instead of 400

    XMLWordPrintable

    Details

      Description

      creating managed object with an array property using string (i.e authzRoles with value "repo/internal/role/openidm-authorized" instead of [

      {"_ref":"repo/internal/role/openidm-authorized"}

      ]) fails with status 500.

      We should get a 400 status code and a more explicit "reason" (currently: "internal server error")
      (note that the message is already informative)

      curl --header "Content-Type: application/json" --header "X-OpenIDM-Password: openidm-admin" --header "X-OpenIDM-Username: openidm-admin" --insecure --data '{"userName": "bjensen","telephoneNumber": "6669876987","givenName": "Barbara","sn": "Jensen","description": "Example User","mail": "bjensen@example.com","authzRoles" : "repo/internal/role/openidm-authorized"}' --request PUT "https://localhost:8443/openidm/managed/user/bjensen"
      {"code":500,"reason":"Internal Server Error","message":"/authzRoles: Expecting a java.util.List"}
      

        Attachments

          Activity

            People

            Assignee:
            emanuel.brici Emanuel Brici
            Reporter:
            laurent.bristiel Laurent Bristiel [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: