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
Handling all possible errors from AWS / Boto #4103
Comments
Hi @Hvass-Labs thanks for reaching out. As mentioned in the error handling documentation that you referenced, it notes:
So while it is possible to account for each specific exception, And the full list of possible exceptions can be found in the exceptions.py file. For example BotoCoreError, which serves as a catchall for unspecified Botocore errors, but wouldn't account for things like networking-related errors. I hope that helps - if you have any more questions please let us know. Or if you are encountering issues other than |
Thanks for the detailed reply! I did actually read the doc-page and noticed the section you highlight :-) But it is still a bit unclear to me, so allow me to ask more specifically:
Thanks for the tip on logging the stack-trace. However, as this is running on a web-server, I don't log the stack-trace because I am worried it might contain the AWS account credentials, which I don't want in the log for security reasons. But perhaps I'm wrong? |
Describe the issue
Hello,
I am using AWS SES to send e-mails. I am new to AWS and it is unclear from the docs how to handle all possible errors arising from AWS / Boto, so they can be logged and investigated later. The user doesn't need to know exactly what happened and will just see a generic error-message.
My code is essentially:
Are these two exception classes sufficient to handle all possible errors arising in AWS / Boto?
Or do I also need to inspect the
response
object for other possible errors if the HTTP status-code isn't 200 for success?Thanks!
Links
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/error-handling.html
The text was updated successfully, but these errors were encountered: