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

How to handle exceptions? #103

Closed
johnsyin opened this issue Oct 30, 2021 · 3 comments
Closed

How to handle exceptions? #103

johnsyin opened this issue Oct 30, 2021 · 3 comments

Comments

@johnsyin
Copy link

johnsyin commented Oct 30, 2021

Was trying to migrate from botocore which provides exceptions module, is there an equivalent of botocore.exceptions.ClientError with error response message?

@johnsyin
Copy link
Author

In fact, I was trying to do the same line of botocore
table.get_item(Key={'PK': pk, 'SK': sk})
to
await table.get_item(key={'PK': pk, 'SK': sk})

However, the request just hangs for about half a minute before it raises aiodynamo.http.base.RequestFailed. Perhaps there are something wrong in my client setup but it is hard to debug from the given exception

@johnsyin
Copy link
Author

Ok turns out I was missing yarn.URL('http://localhost:8000'), now I can see errors raising from aiodynamo.errors, it maybe worth to include the available errors in docs

@dimaqq
Copy link
Contributor

dimaqq commented Oct 31, 2021

I think it would be nice to list all of https://github.com/HENNGE/aiodynamo/blob/master/src/aiodynamo/errors.py in documentation, specifically if the "expected" conditions are semantically significant.
I guess it has not been a priority so far 🤷🏿

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

No branches or pull requests

2 participants