Summary
UpdateExpression syntax errors emit a shorter message than real DynamoDB: the offending token is not quoted, and the surrounding source window (near:) is missing.
Version: dynoxide 0.9.9
Test: tests/tier3/error-messages/updateItem.test.ts "invalid UpdateExpression syntax"
Expected:
Invalid UpdateExpression: Syntax error; token: "INVALID", near: "INVALID SYNTAX"
Actual:
Invalid UpdateExpression: Syntax error; token: INVALID
Reproduction
npx dynoxide --port 8001 &
node -e '
import("@aws-sdk/client-dynamodb").then(async ({ DynamoDBClient, CreateTableCommand, UpdateItemCommand }) => {
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 UpdateItemCommand({ TableName: t, Key: { pk: { S: "x" } }, UpdateExpression: "INVALID SYNTAX HERE", ExpressionAttributeValues: { ":v": { S: "v" } } })); }
catch (e) { console.log(e.message); }
});
'
Conformance run: https://github.com/nubo-db/dynamodb-conformance/actions/runs/24932177778
Summary
UpdateExpressionsyntax errors emit a shorter message than real DynamoDB: the offending token is not quoted, and the surrounding source window (near:) is missing.Version: dynoxide 0.9.9
Test:
tests/tier3/error-messages/updateItem.test.ts"invalid UpdateExpression syntax"Expected:
Actual:
Reproduction
Conformance run: https://github.com/nubo-db/dynamodb-conformance/actions/runs/24932177778