Open
Labels
P3Low priorityLow priorityawsAmazon Web ServicesAmazon Web Servicesaws-parityAWS real-cloud parity gapAWS real-cloud parity gapbugSomething isn't workingSomething isn't working
Description
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
__typefor about a dozen operations (PutMetricData, PutMetricAlarm, metric streams, dashboards) and need updating. ValidationErrorhas no model shape, so it needs a deliberate choice.
Metadata
Metadata
Assignees
Labels
P3Low priorityLow priorityawsAmazon Web ServicesAmazon Web Servicesaws-parityAWS real-cloud parity gapAWS real-cloud parity gapbugSomething isn't workingSomething isn't working
Activity