My query Params looks like this:
const params = {
TableName: 'Todo-xxxxxxxxxxxxxxxxx-dev',
IndexName: 'title-createdAt-index',
KeyConditionExpression: '#title =:value',
ExpressionAttributeValues: { ':value': "hi", },
ExpressionAttributeNames: { '#title': 'title', }
};
When I'm changing the ExpressionAttributeValues
from hi
to hii
it is throwing an error:
{
"errorType": "TypeError",
"errorMessage": "Cannot read properties of undefined (reading 'id')",
"trace": [
"TypeError: Cannot read properties of undefined (reading 'id')",
" at Runtime.exports.handler (/var/task/index.js:76:29)",
" at processTicksAndRejections (node:internal/process/task_queues:96:5)"
]
}
It is only working for hi
and h
if I put any value like abc
,xyz
it is giving above error.
Please provide the entire code snippet, what you have shared is not enough to help.