Summary
ProjectionExpression syntax errors emit a shorter message than real DynamoDB: the source-window context (, near: "...") is missing. Surfaced by tier-3 exact-string assertions in the conformance suite.
Related to #12, but a different code path. Issue #12's UpdateExpression formatter lacks token quoting and near:; the ProjectionExpression formatter already quotes the token, so only the near: window is missing here.
Version: dynoxide 0.9.9
Cases
GetItem
Test: tests/tier3/error-messages/getItem.test.ts "invalid ProjectionExpression syntax: full parser error"
Expected:
Invalid ProjectionExpression: Syntax error; token: "!", near: "!!"
Actual:
Invalid ProjectionExpression: Syntax error; token: "!"
TransactGetItems
Test: tests/tier3/error-messages/transactGetItems.test.ts "invalid ProjectionExpression syntax: full parser error"
Same expected/actual as GetItem above. Request-level ValidationException, the parser rejects the expression before any per-action processing runs.
Reproduction
npx dynoxide@0.9.9 --port 8001 &
node -e '
import("@aws-sdk/client-dynamodb").then(async ({ DynamoDBClient, CreateTableCommand, GetItemCommand }) => {
const c = new DynamoDBClient({ endpoint: "http://localhost:8001", region: "us-east-1", credentials: { accessKeyId: "f", secretAccessKey: "f" } });
const t = "t" + Date.now();
await c.send(new CreateTableCommand({ TableName: t, AttributeDefinitions: [{ AttributeName: "pk", AttributeType: "S" }], KeySchema: [{ AttributeName: "pk", KeyType: "HASH" }], BillingMode: "PAY_PER_REQUEST" }));
try { await c.send(new GetItemCommand({ TableName: t, Key: { pk: { S: "x" } }, ProjectionExpression: "!!! INVALID !!!" })); }
catch (e) { console.log(e.message); }
});
'
Summary
ProjectionExpressionsyntax errors emit a shorter message than real DynamoDB: the source-window context (, near: "...") is missing. Surfaced by tier-3 exact-string assertions in the conformance suite.Related to #12, but a different code path. Issue #12's
UpdateExpressionformatter lacks token quoting andnear:; theProjectionExpressionformatter already quotes the token, so only thenear:window is missing here.Version: dynoxide 0.9.9
Cases
GetItem
Test:
tests/tier3/error-messages/getItem.test.ts"invalid ProjectionExpression syntax: full parser error"Expected:
Actual:
TransactGetItems
Test:
tests/tier3/error-messages/transactGetItems.test.ts"invalid ProjectionExpression syntax: full parser error"Same expected/actual as GetItem above. Request-level ValidationException, the parser rejects the expression before any per-action processing runs.
Reproduction