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
- Worker functions stuck on "Fetched 0 fun...
Appwrite Version: 1.9.0 Bug Description: The appwrite-worker-functions container gets stuck in an infinite loop logging "Fetched 0 functions..." while scheduled...
- I am using s3 for app storage but is it ...
_APP_STORAGE_DEVICE=s3 puts everything to the s3 storage but i need to be able to keep the function builds and site in the local and not waste the cloud storage...
- Local Serverless Function Testing: Are D...
I have followed the instructions to get the CLI working, and have been able to log-in, initialize my project, and created a simple Python function, which calls ...