fix(dynamodb): list a missing table name in the older PutItem and DeleteItem checks (#8417)

This commit is contained in:
TATSUNO “Taz” Yasuhiro authored and GitHub committed 2026-11-14 23:39:07 -04:00
1 parent d64d02e8f2
commit 558453df20
2 files changed
+7 -2

No files matched your search

@@ -680,7 +680,7 @@ public class NativeDynamoDbJsonHandler {
List.of("ALL_NEW", "UPDATED_OLD", "ALL_OLD", "NONE", "UPDATED_NEW");
private static final List<String> OLDER_CONDITIONAL_OPERATORS = List.of("OR", "AND");
// The older validator lists the members in this order and leaves out a missing table name.
// The older validator lists the members in this order.
private void requireValidOlderItemWrite(JsonNode request, String target) {
String tableName = textOrNull(request, "TableName");
String returnValues = textOrNull(request, "ReturnValues");
@@ -697,7 +697,9 @@ public class NativeDynamoDbJsonHandler {
if ("Key".equals(target) && !request.hasNonNull(target)) {
validationErrors.add(SmithyValidationErrors.notNull("key"));
}
if ("".equals(tableName)) {
if (tableName == null) {
validationErrors.add(SmithyValidationErrors.notNull("tableName"));
} else if (tableName.isEmpty()) {
validationErrors.add(SmithyValidationErrors.lengthTooShort("tableName", "", 1));
}
throwValidationErrors(validationErrors);