Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Make operations correctly model service errors #581

Merged
merged 14 commits into from
Sep 13, 2023

Conversation

sichanyoo
Copy link
Contributor

@sichanyoo sichanyoo commented Aug 29, 2023

Issue #

Addresses the Issue #1080

Description of changes

Adds service errors into pre-existing code-generation flow for error initializers and error deserializers

Corresponding PR in aws-sdk-swift: awslabs/aws-sdk-swift#1114

Scope

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

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sichanyoo sichanyoo changed the title fix/Make operations correctly model service errors fix:Make operations correctly model service errors Aug 29, 2023
@sichanyoo sichanyoo changed the title fix:Make operations correctly model service errors fix: Make operations correctly model service errors Aug 29, 2023
Copy link
Contributor

@dayaffe dayaffe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic looks good! Requesting some Kotlin code updates

Copy link
Contributor

@dayaffe dayaffe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Contributor

@jbelkins jbelkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my lone comment; though this would work, I think an alternate approach would be better suited.

@sichanyoo sichanyoo requested a review from dayaffe September 5, 2023 21:59
Copy link
Contributor

@dayaffe dayaffe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Please fix failing CI. If further changes are required re-request review.

@sichanyoo sichanyoo force-pushed the fix/make-operations-model-service-errors branch from fd20b70 to 1147526 Compare September 12, 2023 00:22
@jbelkins jbelkins self-requested a review September 12, 2023 23:07
Copy link
Contributor

@jbelkins jbelkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case where there are no modeled errors on the service, we should omit the method for topLevelServiceErrorMembers and the calls to it.

This is consistent with elsewhere in codegen, where components are omitted where they are an empty set or otherwise serve no function.

@sichanyoo sichanyoo force-pushed the fix/make-operations-model-service-errors branch from bd7198d to 530ea94 Compare September 13, 2023 00:03
@sichanyoo sichanyoo requested a review from jbelkins September 13, 2023 00:12
@sichanyoo sichanyoo merged commit 718270e into main Sep 13, 2023
@sichanyoo sichanyoo deleted the fix/make-operations-model-service-errors branch September 13, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants