-
Bug
-
Resolution: Timed out
-
Medium
-
None
-
3
-
Severity 3 - Minor
-
Issue Summary
I am using the REST API call to add a user to a group (here: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-rest-api-3-group-user-post\). When the specified user is already a member of the specified group, the REST API call fails, as expected. However, the returned HTTP error is 400, and the HTTP response contains one error message that is not documented.
So there are two problems here:
1. The group name is not present in the error message
2. The documentation for the 400 error says that it happens if:
- group name is not provided.
- accountId is missing.
Steps to Reproduce
- Step 1 Use the REST API call to add a user to a group (here: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-rest-api-3-group-user-post\).
- Step 2 When the specified user is already a member of the specified group, the REST API call fails, as expected.
Expected Results
- The error message should be the group name instead of the group ID on which the user already exists.
- The error that happened to me is not documented which should have been documented.
Actual Results
- The error message is not documented.
However, the returned HTTP error is 400, and the HTTP response contains one error message:
"Cannot add user. User is already a member of '{1}'".
Workaround
Currently, there is no known workaround for this behavior. A workaround will be added here when available
[ID-8004] Using REST API to add a user to a group to which it already belongs, error code is misleading
Resolution | New: Timed out [ 10 ] | |
Status | Original: Gathering Impact [ 12072 ] | New: Closed [ 6 ] |
Support reference count | Original: 2 | New: 3 |
Support reference count | Original: 1 | New: 2 |
Support reference count | New: 1 |
Component/s | Original: JIRA [ 13891 ] | |
Component/s | New: Directory - Groups - Add / remove users [ 66395 ] | |
Key |
Original:
|
New:
|
Symptom Severity | New: Severity 3 - Minor [ 14432 ] | |
Workflow | Original: classic default workflow for Feedback Project [ 4288402 ] | New: JAC Bug Workflow v3 [ 4288666 ] |
Project | Original: Feedback [ 12310 ] | New: Identity [ 16810 ] |
Status | Original: Open [ 1 ] | New: Gathering Impact [ 12072 ] |
Description |
Original:
h3. Issue Summary
I am using the REST API call to add a user to a group (here: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-rest-api-3-group-user-post\). When the specified user is already a member of the specified group, the REST API call fails, as expected. However, the returned HTTP error is 400, and the HTTP response contains one error message: "Cannot add user. User is already a member of '{1}'". So there are two problems here: 1. The group name is not present in the error message 2. The documentation for the 400 error says that it happens if: - group name is not provided. - accountId is missing. h3. Steps to Reproduce # Step 1 Use the REST API call to add a user to a group (here: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-rest-api-3-group-user-post\). # Step 2 When the specified user is already a member of the specified group, the REST API call fails, as expected. h3. Expected Results * The error message should be the group name instead of the group ID on which the user already exists. * The error that happened to me is not documented which should have been documented. h3. Actual Results * Error message which is not documented. {quote}However, the returned HTTP error is 400, and the HTTP response contains one error *message:* "Cannot add user. User is already a member of '{1}'".(quote} The below exception is thrown in the xxxxxxx.log file: {noformat} ... {noformat} h3. Workaround Currently, there is no known workaround for this behavior. A workaround will be added here when available |
New:
h3. Issue Summary
I am using the REST API call to add a user to a group (here: [https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-rest-api-3-group-user-post\|https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-rest-api-3-group-user-post]). When the specified user is already a member of the specified group, the REST API call fails, as expected. However, the returned HTTP error is 400, and the HTTP response contains one error message that is not documented. So there are two problems here: 1. The group name is not present in the error message 2. The documentation for the 400 error says that it happens if: - group name is not provided. - accountId is missing. h3. Steps to Reproduce # Step 1 Use the REST API call to add a user to a group (here: [https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-rest-api-3-group-user-post\|https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-rest-api-3-group-user-post]). # Step 2 When the specified user is already a member of the specified group, the REST API call fails, as expected. h3. Expected Results * The error message should be the group name instead of the group ID on which the user already exists. * The error that happened to me is not documented which should have been documented. h3. Actual Results * The error message is not documented. {quote}However, the returned HTTP error is 400, and the HTTP response contains one error *message:* "Cannot add user. User is already a member of '\{1}'".{quote} h3. Workaround Currently, there is no known workaround for this behavior. A workaround will be added here when available |
Hi everyone,
Thank you for watching, following, and providing valuable feedback for our teams. Due to inactivity, we will be closing this bug as "Timed Out", but if this is still affecting your team, let us know so we can potentially re-evaluate.