The code above produces a new row in my database with the key 'nonexistent_key', But I would expect to get an ItemNotFoundException like I would if I were just using update.
I know I can probably add a ConditionExpression to this call to make sure the thing I'm trying to update exists, but that seems to defeat the purpose of passing in the toUpdate parameter. Is there some configuration I can pass in to force an error, am I missing something, or is this really expected behavior?
I'm trying to run a custom update on my table, but I'm running into unexpected behavior if there is no row with the key I specify
The code above produces a new row in my database with the key 'nonexistent_key', But I would expect to get an ItemNotFoundException like I would if I were just using
update
.I know I can probably add a ConditionExpression to this call to make sure the thing I'm trying to update exists, but that seems to defeat the purpose of passing in the
toUpdate
parameter. Is there some configuration I can pass in to force an error, am I missing something, or is this really expected behavior?