Rank 2: Process
I upgraded from 1.3.8 to 1.4.5 using the official commands (upgrade + migrate).
My functions started not executing when my app calls them.
I figured all the updates I had to do (btw a migration guide would have been super useful, it's barely indicated in the documentation....)
Here is my function code now (a snippet) :
import datetime
import json
import os
import random
from appwrite.client import Client
from appwrite.query import Query
from appwrite.services.databases import Databases
def main(context):
context.log("Hello world!")
context.log(os.environ['APPWRITE_FUNCTION_PROJECT_ID'])
client = Client()
(
client
.set_endpoint("https://example.app/v1")
.set_project(os.environ['APPWRITE_FUNCTION_PROJECT_ID'])
.set_key(os.environ["APPWRITE_FUNCTION_API_KEY"])
)
try:
payload = json.loads(context.req.payload)
context.log(payload)
context.log(os.environ['APPWRITE_FUNCTION_USER_ID'])
user_id = os.environ['APPWRITE_FUNCTION_USER_ID']
context.log(payload, user_id)
except Exception as e:
context.error(e)
return context.res.send(e, 500)
It just fails everytime, I don't even have the log in the executions.
It simply spits out An internal curl error has occurred within the executor! Error Msg: Could not resolve host: 652c11d386e18\nError Code: 500
What's the issue ?