kalajian
Hi there,
I have what looks like a strange issue: I am getting a Warning about a possible unhandled promise rejection, that says "Error: AppwriteException: Missing required parameter: "email"" and it's pointing to my "throw" statement in a try/catch block:
TypeScript
try {
const newAccount = await account.create(
ID.unique(),
email,
password,
username
);
if(!newAccount) throw Error;
const avatarUrl = avatars.getInitials(username);
await signIn(email, password);
const newUser = await databases.createDocument(
appwriteConfig.databaseId,
appwriteConfig.userCollectionId,
ID.unique(),
{
accountId: newAccount.$id,
email,
username,
avatar: avatarUrl,
}
);
return newUser;
} catch (error) {
throw new Error(error);
}
}```
Any ideas?
TL;DR
Possible unhandled promise rejection error due to missing "email" parameter. Check that the "email" parameter is being passed correctly. Fix by ensuring the "email" parameter is included when calling the function in the createUser function. Recommended threads
- Deep Linking & Password reset
I am using react native with expo. I want to implement deep link with the url recived via email. So when clicked the link it opens my app. I havent ever used de...
- Need Help with Google OAuth2 in Expo usi...
I'm learning React Native with Expo and trying to set up Google OAuth2 with Appwrite. I couldn't find any good docs or tutorials for this and my own attempt did...
- [SOLVED] React Native Appwrite SDK not w...
So I'm trying to generate a unique ID using the ID.unique() and its generating properly, but its saying its longer than 36 characters but it isnt.. ```typescri...