Here's the error:
Client warn: request fail {
code: 'validation_error',
message: 'body failed validation. Fix one: body.properties.body.id should be defined, instead was undefined
.
body.properties.body.name should be defined, instead was undefined
. body.properties.body.start should be defined, instead was undefined
.'
}
body failed validation. Fix one: body.properties.body.id should be defined, instead was undefined
. body.properties.body.name should be defined, instead was undefined
. body.properties.body.start should be defined, instead was undefined
Here's my code :
async function update() {
const res_2 = await notion.databases.query({ database_id: `${databaseId}` });
res_2.results.forEach(async (page, index) => {
let property_id = page.properties.Excerpt.id;
if (index === 0) {
try {
const res_3 = await notion.pages.update({
page_id: page.id,
properties: {
[property_id]: {
type: "rich_text",
rich_text: {
"content": "hey"
}
}
}
})
} catch (err) {
console.log(err.message)
}
}
})
}
update();
I am not getting why there is a body validation error and from where it originated. Any fixes?