[SERVER-11798] Change format of setParameter return object Created: 20/Nov/13  Updated: 26/Oct/21  Resolved: 26/Oct/21

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Shaun Verch Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

The proposed output, when run with multiple parameters, would be:

{
    "option1" : {
               "result" : { }
    },
    "option2" : {
               "errMsg" : "..."
    }
   "ok" : 0
}

The behavior of command execution then, would need to be:

1. Make sure the user isn't trying to set the same parameter twice, and return an error if that is the case
2. Attempt to set the parameters in order, populating the result object as we go
3. On failure, add an entry with "errMsg" to the result object
4. Set "ok" depending on whether we had a failure

Note that when setting multiple parameters, this means that if we have an error, parameters that would have been set after the error won't appear in the result object, while parameters set before the error will have result subobjects.


Generated at Thu Feb 08 03:26:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.