botocore icon indicating copy to clipboard operation
botocore copied to clipboard

Add RequestId to error message

Open tdriscoll opened this issue 3 years ago • 1 comments

This adds the RequestID to the error string. The RequestID is useful/required when raising tickets with AWS support.

It's possible to catch these errors and explicitly log the RequestID but that means handling exceptions for every API call. I believe it is also possible with DEBUG logging but that logs much more than errors.

My experience was that I went to report an error but did not have the foresight to log the request id. In addition, it was a difficult to reproduce error. This is why I like the idea of including the RequestID by default for errors.

I tried to keep to the style of the repo but let me know if you want me to clean anything up.

tdriscoll avatar Feb 02 '22 00:02 tdriscoll

Thanks for the PR, @tdriscoll. I note that this would close this issue (you also requested, thanks!):

https://github.com/boto/boto3/issues/1143

I don't have a timeline when this will get a review.

kdaily avatar Feb 24 '22 20:02 kdaily