TypeScript
const { users, databases } = await createAdminClient();
const session = await getLoggedInUser();
const user = await users.get(session.$id);
if (!user) {
throw new Error("User not found");
}
await users.updateEmail(user.$id, email);
await users.updateName(user.$id, first_name + " " + last_name);
if (phone) {
await users.updatePhone(user.$id, phone);
}
it throwing ⨯ AppwriteException: A target with the same ID already exists.
at async updateProfile (account/action.ts:32:9)
TL;DR
Error message "A target with the same ID already exists" is thrown when updating user information due to a conflict.
Possible solution: Check for duplicate IDs in the update process to prevent errors.Recommended threads
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Appwrite Storage error 503s for automate...
I'm facing error 503s from Appwrite after about 5-6 seconds of making AI requests from my tool with images and files above 20MB (=> not inline base64 used, but ...
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...