The following code leads to this error,
const account = new Account(client);
const user = await account.get();
It happens on a local deployed function (deployed to my local docker instance). The function has been invoked from the client SDK, but this code got problem.
The APPWRITE_FUNCTION_API_ENDPOINT has an value of http://localhost/v1, is it correct?
The client is being initialized like this:
const client = new Client()
.setEndpoint(Bun.env["APPWRITE_FUNCTION_API_ENDPOINT"])
.setProject(Bun.env["APPWRITE_FUNCTION_PROJECT_ID"])
.setKey(req.headers["x-appwrite-key"]);
// Get JWT token from headers
const jwt = req.headers["x-appwrite-user-jwt"];
if (jwt) {
client.setJWT(jwt);
}
Recommended threads
- How to Display File in Web?
I'm trying to use Appwrite's Storage to store images and display them in my app, however when I use the `getFileView`, `getFileDownload` or `getFilePreview` met...
- Project Paused Despite Daily Active Usag...
I noticed that my project was automatically **paused**, even though it is actively being used. The project is an **attendance application** that is used daily b...
- Sudden CORS Errors - Domain hasn't Chang...
I have an Appwrite project with two web apps configured, the first one has the hostname `*` and the second one I just added to test if it could fix the issue wi...