fix(dynamodb): reject QueryFilter with KeyConditionExpression (#2935)

* fix(dynamodb): reject QueryFilter with key expression

* test(dynamodb): keep QueryFilter test legacy
This commit is contained in:
Aniket Shukla authored and GitHub committed 2026-09-02 11:41:14 -04:00
1 parent de6bf8f599
commit 7d693de663
4 files changed
+59 -4

No files matched your search

@@ -826,6 +826,11 @@ public class DynamoDbJsonHandler {
"Can not use both expression and non-expression parameters in the same request: "
+ "Non-expression parameters: {KeyConditions} Expression parameters: {KeyConditionExpression}", 400);
}
if (keyConditionExpr != null && queryFilter != null) {
throw new AwsException("ValidationException",
"Can not use both expression and non-expression parameters in the same request: "
+ "Non-expression parameters: {QueryFilter} Expression parameters: {KeyConditionExpression}", 400);
}
if (filterExpr != null && queryFilter != null) {
throw new AwsException("ValidationException",
"Can not use both expression and non-expression parameters in the same request: "