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

Include RequestID in str() for ClientError #2610

Closed
tdriscoll opened this issue Feb 7, 2022 · 2 comments
Closed

Include RequestID in str() for ClientError #2610

tdriscoll opened this issue Feb 7, 2022 · 2 comments
Labels
duplicate This issue is a duplicate. feature-request This issue requests a feature.

Comments

@tdriscoll
Copy link

Is your feature request related to a problem? Please describe.

When raising a ticket with AWS Support, they may ask for the RequestID before triaging further. Logging the botocore exception doesn't give you the RequestID (as far as i can tell).

I see two alternatives to this feature request:

  • Using try/except and catching the ClientError. This is hard because I need to add the try/except in many places. With my luck I will forget the one place that I needed it.
  • Enable DEBUG. Unfortunately, this creates much more logging than just the RequestID for errors.

Also in my use case, the error was hard to reproduce. This is why I am suggesting it as a default behavior (although enabling this change behind an environment variable or flag would be fine).

Describe the solution you'd like

I'd like to include the RequestId in the string of the error. This way I will have it when i use log.exception()

I have a suggested implementation but I am open to whatever:
#2605

@tdriscoll tdriscoll added feature-request This issue requests a feature. needs-triage This issue or PR still needs to be triaged. labels Feb 7, 2022
@kdaily
Copy link
Member

kdaily commented Feb 8, 2022

Hi @tdriscoll, thanks for the request. This primarily affects boto3, and there's a feature request there:

boto/boto3#1143

Using the suggestion there (getting it from the metadata) is probably what you're doing. Can you please add in your vote on the initial comment, and any other details there? I'll link this issue as a duplicate.

Thanks!

@kdaily kdaily added duplicate This issue is a duplicate. and removed needs-triage This issue or PR still needs to be triaged. labels Feb 8, 2022
@kdaily kdaily closed this as completed Feb 8, 2022
@github-actions
Copy link

github-actions bot commented Feb 8, 2022

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue is a duplicate. feature-request This issue requests a feature.
Projects
None yet
Development

No branches or pull requests

2 participants