You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
aws-cloudwatch: map typed SDK errors over rpc-v2-cbor (writeCBORError) #1716
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