Hi people,
i’m beginning my pack maker journey by improving todoist sample right here https://coda.io/packs/build/latest/samples/full/todoist/
I’ve set a CompleteTask()
function that worked fine until today, by creating a post request to the url to complete the task
pack.addFormula({
name: "CompleteTask",
description: "CompleteATask.",
parameters: [
coda.makeParameter({
type: coda.ParameterType.String,
name: "taskId",
description: "The ID of the task.",
}),
],
resultType: coda.ValueType.Object,
schema: coda.withIdentity(TaskSchema, "Task"),
isAction: true,
execute: async function ([taskId], context) {
let url = "https://api.todoist.com/rest/v2/tasks/" + taskId + "/close";
let response = await context.fetcher.fetch({
method: "POST",
url: url,
// headers: {
// "Content-Type": "application/json",
//},
});
},
});
I’m absolutely sure this code can be improved, but it worked for now.
For some unexplicable reason, since this morning I get this error, and of course I cannot understand why, since I did not touch anything in this function (I even reloaded previous code to cancel other part of code modification).
Formula in coda, task id beeing alright and fetched from the pack itself
Does anyone have an idea ?
Thanks