aws-sdk-java-v2 icon indicating copy to clipboard operation
aws-sdk-java-v2 copied to clipboard

Update non-streaming error unmarshalling to use new mapping function

Open S-Saranya1 opened this issue 9 months ago • 2 comments

Update non-streaming error unmarshalling to use new mapping function.

Motivation and Context

This change updates the non-streaming error unmarshalling to use the same mapping function that was previously implemented for streaming operations. This change deprecates BaseAwsJsonProtocolFactory#createErrorResponseHandler(JsonOperationMetadata). We have switched all usages in generated code to the replacement, createErrorResponseHandler(JsonOperationMetadata,Function).

Modifications

  • Updated non-streaming error unmarshalling to use exceptionMetadataMapper
  • Removed registerModeledException calls from initProtocolFactory
  • Updated codegen test files to match new exception mapping implementation

Testing

  • Added a test in kinesis service and verified it unmarshalled correctly
  • Ran integration tests

Screenshots (if appropriate)

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)

Checklist

  • [x] I have read the CONTRIBUTING document
  • [x] Local run of mvn install succeeds
  • [x] My code follows the code style of this project
  • [x] My change requires a change to the Javadoc documentation
  • [x] I have updated the Javadoc documentation accordingly
  • [x] I have added tests to cover my changes
  • [x] All new and existing tests passed
  • [x] I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • [ ] My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • [x] I confirm that this pull request can be released under the Apache 2 license

S-Saranya1 avatar Mar 25 '25 23:03 S-Saranya1

Changes look good, but looks like existing Kinesis unit tests are failing, can we fix those?

davidh44 avatar Apr 07 '25 20:04 davidh44