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

generate a per service base exception #233

Closed
aajtodd opened this issue Mar 5, 2021 · 0 comments · Fixed by #270
Closed

generate a per service base exception #233

aajtodd opened this issue Mar 5, 2021 · 0 comments · Fixed by #270
Assignees
Labels
design enhancement New feature or request
Milestone

Comments

@aajtodd
Copy link
Contributor

aajtodd commented Mar 5, 2021

Currently we generate something like:

SdkBaseException < ServiceException < com.example.foo.SomeException

OR in case of AWS services

SdkBaseException < ServiceException < AwsServiceException < aws.sdk.kotlin.foo.SomeException

We should consider changing this to generate a per/service base exception such that the hierarchy looks like:

SdkBaseException < ServiceException < com.example.foo.SomeException < com.example.foo.SomeException

// AWS equivalent

SdkBaseException < ServiceException < AwsServiceException < aws.sdk.kotlin.foo.FooException < aws.sdk.kotlin.foo.SomeException

This would allow customers to catch exceptions "at a distance" and distinguish which service was at fault.

Note: The Java V2 SDK does it this way.

@aajtodd aajtodd added enhancement New feature or request design kt-ga labels Mar 5, 2021
@aajtodd aajtodd added this to the M1 milestone Mar 22, 2021
@aajtodd aajtodd self-assigned this Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant