Skip to content

Error message text is substrate-shaped rather than AWS-shaped across ~650 AWSError literals #487

Closed

Description

@scttfrdmn

What

Substrate matches AWS on error codes and HTTP statuses — #392 closed that gap — but
it largely invents message text. Of 1090 Message: literals in non-test
emulator/ code, only seven files carry researched wording with a provenance note in
the code (sqs_messagesize.go, sqs_messageattrrules.go, ec2_tags.go,
ec2_launchtemplate_versions.go, ec2_instanceattribute.go, s3_publicaccess.go,
server.go). The rest are substrate-shaped:

  • 219 are some form of "X is required", where AWS says e.g. The request must contain the parameter InstanceId.
  • 214 are some form of "... not found", where EC2 says The instance ID 'i-abc' does not exist.

ec2_plugin.go had Instance not found: i-abc until #473 replaced it on the two paths
it touched. That is the shape, repeated a few hundred times.

Why it is worth tracking but is not a sweep

This is less severe than the codes gap #392 closed: botocore and aws-sdk-go-v2
dispatch on Error.Code and never on message text, so a consumer's error branch turns
on the part substrate already gets right. A test that asserts on message text is
asserting on something AWS itself does not treat as contract.

It is also not fixable from the documentation. The API reference's Errors sections
give descriptions of error conditions, not the strings AWS sends. Rewriting several
hundred messages into AWS-looking text from inference would replace honestly
substrate-shaped strings with invented ones that read as authoritative — strictly worse
than the status quo, because a reader could no longer tell which messages were
researched.

Constraint on any fix

Each changed message needs its own corroborating source: a captured real-AWS
response (an issue tracker, a bug report, a support thread) or a parity-tested
reimplementation (moto, LocalStack — both snapshot-test against real AWS in places).
The established pattern is to name that source in the code comment beside the literal,
and to say plainly when no capture exists and the text is substrate's own — see
sqs_messageattrrules.go and ec2_instanceattribute.go for both halves of that.

So this is best done incrementally, by service, as each is touched for other
reasons
, not as one PR. The highest-value targets are the messages a consumer is most
likely to read while debugging: the not found family, and the required-parameter
family, both of which have well-known AWS wording.

Where this is stated today

docs/fidelity.md commits to verifying "request/response shapes, error codes,
pagination, and IAM condition keys" and does not mention message text — no false claim,
but the gap was not stated either. That page now carries the position explicitly and
points here.

No milestone: this is a standing quality item rather than a release deliverable.

Activity

  1. added
    type: feature
    on Aug 2, 2026
  2. scttfrdmn commented on Sep 20, 2026

    @scttfrdmn
    OwnerAuthor

    Left unmilestoned deliberately in the roadmap pass that assigned the other 84 open issues to v0.121.0–v0.127.0.

    At ~650 AWSError literals this is epic-scale, and the blocker is method rather than effort: nothing decides yet whether the AWS-shaped text comes from a generated per-service table, from the vendored service models already in the tree, or from 650 hand edits. Those are different releases. Until that is chosen, a milestone would be a number attached to unknown work.

    It is also partly overtaken as it stands: v0.120.0 (#1064, #1066) and the v0.124.0 milestone rework error codes and statuses across many of the same literals, so the message-text sweep should follow rather than collide with them.

  3. added a commit that references this issue on Nov 15, 2026
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

    fidelitytype: feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions