
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
- Hola equipo de soporte,
Hola equipo de soporte, Estoy desarrollando una Function en Appwrite Cloud con Node.js 22 y el siguiente package.json: { "name": "upload-whitelist", "type"...
- Function running in cloud but not locall...
Hi everyone, I have an appwrite function which is on python3.12 runtime. I have a library (hnswlib) which builds wheels during installation. This works on appwr...
- Permissions for bulk operation
Hi team, I have a question: “In the databases.createDocuments bulk API, can I set document-level permissions? If yes, how exactly should I include the permissio...
