While calling account.createRecovery method to cloud.appwrite.io using web sdk, I got General Unknown 500 Error. I have checked my codes and cloud configuration items, and there are no issues. My project id is: yijiangaitu
export const createRecovery = async (email: string, url: string) => {
const account = getAccount();
return (
email &&
url &&
(await account.createRecovery(email, url).then(
() => {
return Promise.resolve();
},
(error) => {
return Promise.reject(error.message);
}
))
);
};
result:
{
"message": "Server Error",
"code": 500,
"type": "general_unknown",
"version": "0.12.48"
}
What does the getAccount function contains?
import { Client, Account, ID } from "appwrite";
export const getClient = () => {
const ENDPOINT = process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT;
const PROJECT = process.env.NEXT_PUBLIC_APPWRITE_PROJECT;
const client =
ENDPOINT &&
PROJECT &&
new Client().setEndpoint(ENDPOINT).setProject(PROJECT);
if (client) {
client.setLocale("zh-cn");
return client;
} else {
throw new Error("client is null");
}
};
export const getAccount = () => {
const client = getClient();
if (client) {
return new Account(client);
} else {
throw new Error("client is null");
}
};
Possible useful information, this project ID matches the ID of a project I previously created (but deleted). But will this have an impact?
Recommended threads
- What does it means
I am looking for Appwrite for migration, but i am confused with the term "Unlimited" in Pricing table of Documents . Kindly Let me know what does it ...
- Migration and Function glitch
I am trying to migrate from non pro appwrite project to pro appwrite project all my data but it's stuck in processing.
- Unable to signup to appwrite cloud
When attempting to create an online cloud account on appwrite.io, I get the following message : "This email address must already be in its canonical form. Pleas...