I have a simple function that gets the transcriptId param but for some reason I get TypeError: error is not a function? I thought this is how your supposed to use error and log?
import { Client, Databases } from 'node-appwrite';
import { throwIfMissing } from './utils.js';
export default async ({ req, res, log, error }) => {
try {
if (req.method === 'GET') {
const transcriptId = req.bodyJson.transcriptId;
if (!transcriptId) {
error("Missing transcriptId parameter");
return res.json({ error: "Missing transcriptId" }, 400);
}
} else {
return res.json({ error: "Method not allowed" }, 405);
}
} catch (e) {
error("Function error:", e);
return res.json({ error: "Internal server error: " + e.message }, 500);
}
};
In the logs, it does say to use context.log() or context.error() but how would I get the context property?
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...