Open angus-faethm opened 8 months ago
Thanks for the report! I can confirm this issue. Will raise it in internally.
One thing to note: the Slack client won't let you empty a usergroup out. I have a feeling that the fact you got to a situation where a usergroup is empty is invalid to begin with, and the error you experienced for an empty group is secondary effect from that. How did you create an empty usergroup?
@filmaj I created a placeholder user group via slack app UI. My use case is.
oncall-support
user group oncall-support
user groupI cannot create an empty usergroup via the Slack UI. When I try, I get a UI like this that prevents me from submitting any changes to the usergroup:
Simiarly, the usergroups.users.update
API that allows for one to manage the membership in a usergroup states, under its Usage:
You can’t use this method to remove all members from a User Group. Use the
usergroups.disable
method instead. If you need to reactivate the usergroup later, you can use theusergroups.enable
method.
I agree with you that the error message should be better, but I did want to clarify the root of the issue when it comes to creating empty usergroups (that should not ever be possible, and if it is, that in itself is a bug).
@filmaj Previously, I can create a user-group and remove all group members via UI when reporting this issue. I am not able to do it again today.
The
deno-slack
versionsDeno runtime version
OS info
Describe the bug
RemoveUserFromUsergroup
Returns an error forusergroup_id
unexpectedly. It happens whenRemoveUserFromUsergroup
exist in target user groupSteps to reproduce
Scenario 1
S060xxxxxx
Scenario 2
S060xxxxxx
containing ONE userU00000xxxxxx
onlyExpected result
Two options a. return step completed even if no user removed b. return a better error message e.g. "Failed to remove user from the user group"
Actual result
Return error
parameter_validation_failed - Validation for parameter ``usergroup_id`` failed: value is not a string
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.