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
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here π I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...
- Our Appwrite organization is suspended
Please give support regarding this , no app is working now , please solve my issue and give support , no one is replying in message section or email.