Skip to content

PutItem: item number errors have no 1 validation error detected: prefix, and DynamoDB adds it #960

Open

Description

@LeeroyHannigan

PutItem refuses a malformed or out-of-range number in its item without the 1 validation error detected: prefix. Amazon DynamoDB answers the same item with the prefix. The wire tests in tests/rust/src/number_validation.rs (lines 67 to 69 at da5bca9) note the difference and match on the message body only.

Measured in us-east-1 on 11 Nov 2026, PutItem with item {pk: S, n: N <value>}. Each row went out twice and got the same answer both times:

n DynamoDB
10E2147483647, 1E2147483648, 1E9223372036854775807 1 validation error detected: Number overflow. Attempting to store a number with magnitude larger than supported range
1E-2147483649, 1E-9223372036854775808 1 validation error detected: Number underflow. Attempting to store a number with magnitude smaller than supported range
1E9223372036854775808 1 validation error detected: The parameter cannot be converted to a numeric value: 1E9223372036854775808
1234567890123456789012345678901234567890E200 1 validation error detected: Attempting to store more than 38 significant digits in a Number
"" (empty) 1 validation error detected: The parameter cannot be converted to a numeric value:

ExtendDB answers each row with the message alone. For the empty value it also leaves out the colon and the space: The parameter cannot be converted to a numeric value.

#620 gives the prefix to the numbers in PutItem's ExpressionAttributeValues and Expected values and in DeleteItem and UpdateItem keys. It leaves the PutItem item text as it is.

Proposed change: add the prefix to PutItem's item number messages, give the empty value the colon, and make the wire tests compare the full text.

Activity

  1. LeeroyHannigan commented on Nov 24, 2026

    @LeeroyHannigan
    CollaboratorAuthor

    DynamoDB adds the same prefix to the other refusals of a value's content, in an item attribute and in an UpdateItem :v value, at any depth. In UpdateItem it puts no ExpressionAttributeValues contains invalid value: ... for key :v wrapper around them.

    Measured in us-east-1 on 24 November 2026 on a table that does not exist. Each request went out twice, with the same answer both times. PutItem sends the value as the attribute a of the item, and UpdateItem sends it as :v in SET a = :v. Both operations get the same ValidationException. PREFIX stands for 1 validation error detected: . The ExtendDB column is from a SQLite release build of the branch of #1437 on the same day.

    Value DynamoDB, both operations ExtendDB
    {"SS": []}, {"L": [{"SS": []}]}, {"M": {"a": {"SS": []}}} PREFIX One or more parameter values were invalid: An string set may not be empty the text without PREFIX, in both operations
    {"NULL": false}, {"L": [{"NULL": false}]} PREFIX One or more parameter values were invalid: Null attribute value types must have the value of true the text without PREFIX, in both operations
    {"L": [{"N": "bob"}]}, {"M": {"a": {"N": "bob"}}} PREFIX The parameter cannot be converted to a numeric value: bob the text without PREFIX, in PutItem

    A NULL payload of the string "no" gets the text of the NULL of false without the prefix. In UpdateItem that text comes with the :v wrapper (measured on the same day). In UpdateItem, ExtendDB answers the two number rows with ResourceNotFoundException, because it looks the table up first (#1380).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions