I am new to AWS and improving a query as below which is a dynamodb table query that will perform search based on the id provided. My question is what the document.query will return if it cannot find the data based on one of the ids array element.
const results = ids.map((id) =>
await documentClient
.query({
TableName: 'table-name',
IndexName: 'by-index-all',
ProjectionExpression:'....',
ExpressionAttributeValues: {
':id':id,
},
KeyConditionExpression:
'id = :id',
})
.promise()
.catch((e) => {
console.log(e);
});