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: Catch all sdk errors #43

Merged
merged 6 commits into from
Mar 15, 2024
Merged

fix: Catch all sdk errors #43

merged 6 commits into from
Mar 15, 2024

Conversation

godu
Copy link
Contributor

@godu godu commented Mar 14, 2024

I think I got it :)
Some errors don't end by "Exception", but inherit the ServiceError.

@godu godu changed the title feat: add client-rds fix: Catch all sdk errors Mar 14, 2024
@godu godu mentioned this pull request Mar 14, 2024
Copy link
Owner

@floydspace floydspace left a comment

Choose a reason for hiding this comment

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

Hey @godu
I fixed a little bit:

  • the ServiceError should not be returned in the methods, it will never be catched by catchTag because it does not have the name (mapped to _tag), it is defined on the final concrete errors only.
  • plus fixed possible bug if aws error name is the same like the error exported by us, for example InternalServerError in dynamodb client, it will be imported from aws and exported with the same name.

@floydspace floydspace merged commit 6e6c0a0 into floydspace:main Mar 15, 2024
3 checks passed
@github-actions github-actions bot mentioned this pull request Mar 15, 2024
@godu godu deleted the client-sqs branch April 24, 2024 08:56
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.

2 participants