-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MS] Batch workspace sharing #8900
base: master
Are you sure you want to change the base?
Conversation
3646795
to
c0d0261
Compare
} | ||
} | ||
|
||
if (!changesMade) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error handling is insufficient here.
You can test it in web mode by updating the mocks for shareWorkspace
and add (as an example)
return { ok: false, error: { tag: ClientShareWorkspaceErrorTag.Offline, error: 'Offline' } };
The error I get is Selected members were already Contributor.
, which is false. I'm not even sure that this error is possible, if you try to assign the same role to a user, I think it'll just work.
Handling multiple errors is always a pain. The best thing to do imo is to count the number of successes, the number of errors, and store the first error (if any). You can then compare it to the number of operations:
successesCount === selectedUsers.value.length
means all gooderrorsCount === selectedUsers.value.length
means all failed, probably a very general case like being offline, being revoked, having insufficient permission (you can check using the error you stored and assume it's the same for all)- some errors is a complicated case, but a generic error like "some failed" is probably enough
c0d0261
to
521002b
Compare
521002b
to
69aa5a7
Compare
Closes #8326
Enregistrement.de.l.ecran.2024-11-18.a.10.57.40.mov