Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-14938

ID repo setAttributes service call returns the wrong error message with multiple datastores

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 13.5.0, 13.5.1, 13.5.2, 14.1.0, 14.1.1, 5.5.1, 6.0.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4, 6.0.0.5, 6.0.0.6, 6.5.0, 6.5.0.1, 6.5.1, 6.5.0.2, 6.0.0.7
    • Fix Version/s: 6.5.2, 7.0.0
    • Component/s: None
    • Labels:
    • Sprint:
      AM Sustaining Sprint 63
    • Story Points:
      1
    • Needs backport:
      No
    • Support Ticket IDs:
    • Needs QA verification:
      No
    • Functional tests:
      No
    • Are the reproduction steps defined?:
      Yes and I used the same an in the description

      Description

      Bug description

      The ID repo service calls setAttributes on each of the data stores and if none of them succeed the last error is returned. The code attempts to not return user not found errors but it is only checking for an ID repo error code of 220, UNABLE_FIND_ENTRY, and we are seeing 223, TYPE_NOT_FOUND. So the error returned is "Identity user.105 of type user not found".

      How to reproduce the issue

      Details steps outlining how to recreate the issue (remove this text)

      1. Setup AM with multiple datastores
      2. Call Rest endpoint to set attributes that do not exist
      Expected behaviour
      HTTP 400:
      {"code":400,"reason":"Bad Request","message":"CORRECT MESSAGE HERE"} 
      
      Current behaviour
      HTTP 404:
      {"code":404,"reason":"Not Found","message":"Identity demo of type user not found."} 
      

      Work around

      OPTIONAL - If you have a workaround, please put the details here (remove this text)

      Code analysis

      OPTIONAL - If you already investigated the code, please share your finding here (remove this text)

      org.forgerock.$className.java
      ...
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sfraser Sam Fraser
                Reporter:
                sfraser Sam Fraser
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2h
                  2h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h
                  2h