-
Notifications
You must be signed in to change notification settings - Fork 274
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
Request Id in Errors #884
base: main
Are you sure you want to change the base?
Request Id in Errors #884
Conversation
Signed-off-by: Haytham Abuelfutuh <[email protected]>
This is a reasonable idea, please let me know when you are finished. Note that moto (the CI backend) probably has a different idea of request ID compared to AWS S3, and of course there are several other S3 implementations (e.g., minio) that might have something different again. |
Thank you for your quick comment, @martindurant. I don't seem to find request ids in minio responses (sad). Not in the body and nor in the response headers. |
Signed-off-by: Haytham Abuelfutuh <[email protected]>
@martindurant mind taking a look? |
This could use a test; any error on moto should have both the status and ID set (non-empty). I wonder whether instead of extending the message, we should add the information to the exception object, so it only shows up for those who want it. What do you think? |
Signed-off-by: Haytham Abuelfutuh <[email protected]>
I briefly looked into that as well because I would like to be able to extract that information separately. But it uses the native OSError type and not sure how you feel about subclassing that? |
@@ -98,7 +98,7 @@ def get_boto3_client(): | |||
|
|||
# NB: we use the sync botocore client for setup | |||
session = Session() | |||
return session.create_client("s3", endpoint_url=endpoint_uri) | |||
return session.create_client("s3", endpoint_url=endpoint_uri, region_name="us-east-1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary?
Sorry I let this drop.
Yes, that's totally since, since |
Add RequestID and Http Status Code to the error object.