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
- TLS provisioning failure for custom doma...
Hi Appwrite team, we’re using Appwrite Sites and TLS provisioning for our custom domain fails. Domain: somnara.app Error: Failed to create TLS subscription –...
- Functions Problem
Whenever I run my AI Generate through Appwrite Functions, I am getting this Call Stack AIService.generateServer (src\services\ai\gemini.ts) next (<native>) ...
- Frequent 500 Internal Server Errors - Pr...
PROJECT ID: 6951f2xxxxx1ee9e750a REGION: Singapore (sgp.cloud.appwrite.io) PLAN: Pro Our production application experiences **500 Internal Server Errors** mult...