
I have this server side code (.NET SDK):
//no label is set, but also no exception is thrown
Task<User> updateLabelTask = users.UpdateLabels(studentId, new List<string> { "student" });
Task<Membership> joinStudentsTask = teams.CreateMembership(AppwriteSettings.StudentsTeamId, new List<string>(), null, user.Id);
Task<Membership> joinSchoolTask = teams.CreateMembership(schoolId, new List<string>() {"student"}, null, user.Id);
Task<Membership> joinGroupTask = teams.CreateMembership(group.Id, new List<string>() {"student"}, null, user.Id);
Task<User> verifyTask = users.UpdateEmailVerification(user.Id, true);
await Task.WhenAll(updateLabelTask, joinStudentsTask, joinSchoolTask, joinGroupTask, verifyTask);
This works fine, except for updating the label. If instead I await the updating and only then continue with the other tasks, it works. Why could that happen? Is this an Appwrite issue?
//label is set to "student"
Task<User> updateLabelTask = users.UpdateLabels(studentId, new List<string> { "student" });
await updateLabelTask;
Task<Membership> joinStudentsTask = teams.CreateMembership(AppwriteSettings.StudentsTeamId, new List<string>(), null, user.Id);
Task<Membership> joinSchoolTask = teams.CreateMembership(schoolId, new List<string>() {"student"}, null, user.Id);
Task<Membership> joinGroupTask = teams.CreateMembership(group.Id, new List<string>() {"student"}, null, user.Id);
Task<User> verifyTask = users.UpdateEmailVerification(user.Id, true);
await Task.WhenAll(joinStudentsTask, joinSchoolTask, joinGroupTask, verifyTask);

Update: It only happens most of the time. Sometimes it works.
Recommended threads
- 404 error when navigating to the team fr...
the version i m running is `1.7.4` as far as i can tell everything is working fine except for this weird bug in the video. when monitoring the appwrite and app...
- [Node.js SDK] Bypass 2GB file limit?
Hello. Using either InputFile.fromPath or InputFile.fromBuffer throws this error: File size (2295467305) is greater than 2 GiB Bucket limit etc. is setup corre...
- Relationship null, even when relationshi...
Hi Everyone, im experiencing issues with set relation data. When im setting the document id from the related database most of them seem fine, except one table. ...
