Skip to content

aws-cloudwatch: map typed SDK errors over rpc-v2-cbor (writeCBORError) #1716

Open

Description

@Satyam-Trivedi-ZS

Follow-up from the review of #1537 (L3).

Over rpc-v2-cbor, writeCBORError in server/aws/cloudwatch/handler.go writes the query error code (InvalidParameterValue, MissingParameter, ...) straight into __type and sends no X-Amzn-Query-Error header. The Go SDK switches on the model shapes (InvalidParameterValueException, MissingRequiredParameterException, ...), so errors.As(err, *types.InvalidParameterValueException) is always false over CBOR. The JSON protocol already maps these through jsonErrorShapes; #1537 fixed only the dashboard not-found error this way.

Suggested fix: route writeCBORError through the same shape table plus X-Amzn-Query-Error, for every operation. Points to handle:

  • Existing parity tests assert the raw CBOR __type for about a dozen operations (PutMetricData, PutMetricAlarm, metric streams, dashboards) and need updating.
  • ValidationError has no model shape, so it needs a deliberate choice.

Activity

  1. added
    bugSomething isn't working
    awsAmazon Web Services
    aws-parityAWS real-cloud parity gap
    P3Low priority
    on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P3Low priorityawsAmazon Web Servicesaws-parityAWS real-cloud parity gapbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions