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

refactor!: generate per/service base exception types #270

Merged
merged 2 commits into from
Apr 14, 2021

Conversation

aajtodd
Copy link
Contributor

@aajtodd aajtodd commented Apr 9, 2021

Issue #, if available:
closes #233

Description of changes:

  • (refactor): generate an exception type named after the service that all other modeled exceptions in the service closure inherit from when generated (e.g. S3Exception). Previously all exceptions inherited directly from AwsServiceException/ServiceException)
  • breaking (refactor): changed the logic used to derive a client name from sdkId to respect words that are already pascal case.
    • We had discussed this previously that it would be better to generate ApiGatewayManagementHub instead of Apigatewaymanagementhub for instance (not a real example necessarily). This wasn't strictly necessary but it seemed better to get this in now than later. The base exception types also inherit this naming scheme so we ended up with exceptions like DynamodbException or ElasticacheException instead of DynamoDbException/ElastiCacheException etc.
    • We (ahem) borrowed the Java v2 SDK logic here for how they name their clients

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aajtodd aajtodd requested review from kggilmer and kiiadi April 9, 2021 18:44
Copy link
Contributor

@kggilmer kggilmer left a comment

Choose a reason for hiding this comment

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

LGTM

@aajtodd aajtodd merged commit 1d3b017 into main Apr 14, 2021
@aajtodd aajtodd deleted the feat-base-exceptions branch April 14, 2021 22:03
aajtodd pushed a commit that referenced this pull request Mar 11, 2024
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.

generate a per service base exception
2 participants