Skip to content

Error messages for deserialization failures and constraint violations #1379

Open
@david-perez

Description

@david-perez

smithy-rs services have returned HTTP 400 since #1000 (v0.34.0) and an X-Amzn-Errortype header set to SerializationException since #1233 (v0.39.0).

We don't put detailed messages in the HTTP body, e.g. things like invalid character at line 5, character 3: expected START_ARRAY when the input data fails to deserialize, or things like:

{
    "message": "1 validation error detected. Value null at '/string' failed to satisfy constraint: Member must not be null",
    "fieldList": [
        {
            "message": "Value null at '/string' failed to satisfy constraint: Member must not be null",
            "path": "/string"
        }
    ]
}

(example protocol test)

when the input data does not satisfy a constraint.


This issue tracks:

  • better error messages for deserialization failures; and
  • better error messages for constraint violations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    serverRust server SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions