refactor(dynamodb): reuse the undefined projection name error (#8043)

Apply the separate follow-up requested on #7870: reuse ExpressionEvaluator.undefinedName in ProjectionEvaluator, preserving the exact error and validation order.

Signed-off-by: Andre Kurait <akurait@amazon.com>
This commit is contained in:
Andre Kurait authored and GitHub committed 2026-11-11 15:55:19 -04:00
1 parent 8240096c08
commit 7d007c2e70
1 file changed
+1 -3
@@ -262,9 +262,7 @@ final class ProjectionEvaluator {
return resolved.asText();
}
if (requireDefinedNames) {
throw new AwsException("ValidationException",
"Invalid ProjectionExpression: An expression attribute name used in the document path "
+ "is not defined; attribute name: " + seg, 400);
throw ExpressionEvaluator.undefinedName("ProjectionExpression", seg);
}
return seg;
}