i tried to log the env variables but its logging null
log(
'ENV',
JSON.stringify(process.env))
when i initiate the client using ENV variables
const client = new sdk.Client()
.setEndpoint(process.env.APPWRITE_FUNCTION_ENDPOINT)
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
.setKey(process.env.APPWRITE_API_KEY);
its returning 0 documents
but when i initiate it directly it shows proper result
Interesting...I didn't know you can call log like that 🧐
0 documents for what? What do you mean by initiate directly? Is this a function from before 1.4?
No no it was my mistake I didn't initialize the api key properly
So it was returning 0 documents
Ah so you figured it out? This can be marked as solved?
Yes.. but if the api key is not proper it should throw error
But instead its still fetching but there are no documents i mean 0
[SOLVED] function not running properly
Recommended threads
- Excessive usage of cloud functions is sl...
I have made almost all my requests through cloud functions and jwt , due to security fears of a user editing a field he is not supposed to . This unfortunately...
- Dart Runtime as Function is missing
Hey guys, I set the _APP_FUNCTIONS_RUNTIMES to dart-3.10 and redeployed the appwrite stack but unfortunately the dart runtime doesnt show up. I copied the val...
- Go 1.25 runtime
So I'm trying to use go 1.25 for my functions and I can only find go-1.23 as a function runtime. So I did some searching and found https://github.com/appwrite/a...