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
- Quota not resetting
hi, im using appwrite's free tier plani hit my read limts last month and the billing cycle said it would reset on june 4th but that is today, the billing cycle ...
- Student plan issue
I am using GitHub student plan, I even got access to appwrite's mock phone number. but when I try to use it, it says the phone number limit has reached
- DB Relational Table Request
Hi, I'd like to suggest a rewording of the relationships between tables. - Current wording: storeOperatingDays can contain one storeId ...