Skip to content

Tier 3: UpdateExpression non-syntax errors missing 'Invalid UpdateExpression:' prefix #13

@hicksy

Description

@hicksy

Summary

UpdateExpression semantic errors should carry the Invalid UpdateExpression: prefix that real DynamoDB applies. The not-defined-attribute-value path doesn't.

Version: dynoxide 0.9.9

Test: tests/tier3/error-messages/updateItem.test.ts "missing ExpressionAttributeValues reference"

Expected:

Invalid UpdateExpression: An expression attribute value used in expression is not defined; attribute value: :v

Actual:

An expression attribute value used in expression is not defined; attribute value: :v

Other UpdateExpression errors in this test file (unused EAV/EAN, mixing parameters, empty expression, key-attribute updates) pass, so the missing prefix is specific to the not-defined-EAV path.

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: "SET attr1 = :v" })); }
  catch (e) { console.log(e.message); }
});
'

Conformance run: https://github.com/nubo-db/dynamodb-conformance/actions/runs/24932177778

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv0.9.10

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions