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
TypeScript
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"
}
TL;DR
The developer is experiencing a General Unknown 500 Error while calling the `account.createRecovery` method. They have checked their codes and cloud configuration items but found no issues. They are wondering if the fact that the project ID matches the ID of a previously created (but deleted) project could have an impact. The code provided includes functions `getClient` and `getAccount` which are used to configure the client and account.
There is no solution mentioned in the thread. Further investigation may be needed to troubleshoot the General Unknown 500 Error.What does the getAccount function contains?
TypeScript
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
- Unknown attribute type: varchar / text
Since the `string` type is deprecated I tried using `varchar` and `text` in some newer tables, but when running `appwrite pull tables && appwrite types ./src/li...
- trying to figure out how to activate my...
please help
- I'm experiencing a critical bug on Appwr...
Hey <@870607367597850624> team / support 👋 I'm experiencing a critical bug on Appwrite Cloud that's blocking my production Flutter app. I've already filed GitH...