ValidationException: ExpressionAttributeValues can only be specified when using expressions: FilterExpression and KeyConditionExpression are null
at Request.extractError (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/protocol/json.js:52:27)
at Request.callListeners (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/request.js:688:14)
at Request.transition (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/request.js:690:12)
at Request.callListeners (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
at Request.emit (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/request.js:688:14)
at Request.transition (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/request.js:690:12)
at Request.callListeners (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
at callNextListener (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
at IncomingMessage.onEnd (/Users/aleksanderhayes/Downloads/notes-api/node_modules/aws-sdk/lib/event_listeners.js:313:13)
at IncomingMessage.emit (events.js:327:22)
at IncomingMessage.EventEmitter.emit (domain.js:467:12)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
code: 'ValidationException',
time: 2021-01-13T10:25:08.652Z,
requestId: '50B8LLSFMCP2MJF0VJ2049HUBNVV4KQNSO5AEMVJF66Q9ASUAAJG',
statusCode: 400,
retryable: false,
retryDelay: 25.676944219402287
}
{
"statusCode": 500,
"body": "{\"error\":\"ExpressionAttributeValues can only be specified when using expressions: FilterExpression and KeyConditionExpression are null\"}"
}
I get this error.
I check amazon document at update item
It seems like the code is right. But the error tell me I should use FilterExpression or KeyConditionExpression, just not UpdateExpression.