Skip to content

Some restJson1 protocol tests assert that servers perform assembly name stripping #1494

@david-perez

Description

@david-perez

IDs:

These httpResponseTests, when interpreted from a server perspective, are asserting that the X-Amzn-Errortype header is set to the error shape ID's name (without the namespace). This technique is called assembly name stripping.

However, note that this is a SHOULD in the spec, not a MUST (see #1493 too):

The value of this component SHOULD contain only the shape name of the error's Shape ID.

We're going to change the implementation of server SDKs in smithy-rs so that the full Shape ID (including namespace) is returned in operation error responses. This is because some existing clients rely on the full shape ID being serialized, and fail if only the shape name is present. Upon making this change, I realized that we now fail these three protocol tests.

It's unclear what the way forward is. I think Smithy should (no pun intended) offer mechanisms for code generators to opt-in/opt-out of SHOULDs and alternative compliant implementations; there's been a need for this in the past (example 1, example 2).

Metadata

Metadata

Assignees

No one assigned

    Labels

    protocol-testNew protocol tests are neededserverThis issue involves the specification for server software.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions