-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 ClientError information in S3UploadFailedError #1986
Comments
Does anyone have any thoughts on this? Is anyone going to look at it? |
@mikenolt - Thank you for your post. Sorry for the late reply. I am looking into it. |
Great, thank you for letting me know @swetashre! Please let me know if you have any questions or need anything from me. |
@mikenolt - Thank you for your reply. I would mark this as feature request. |
Okay @swetashre. I think it's a bug since it's not consistent with the other error implementations and the user can't easily get the error code or message but understand it technically isn't a bug. Thanks for looking at it. Can I interest you in looking at issue #1987? That does seem like a bug. Mike |
@mikenolt - Thanks for the feedback. I will look into that. |
@mikenolt |
Greetings! It looks like this issue hasn’t been active in longer than one year. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one. |
Definitely still an issue 5+ years later. My first foray into boto error handling has been with S3, so you can imagine my surprise when this happened. |
First issue post so please bear with me.
I am using boto3 (1.9.141) and python 3.7.
When I have invalid keys, I want to trap the response and see if ClientError.response['Error']['Code] is 'InvalidAccessKeyId'. This works great for most of the calls (list_buckets, list_objects, head_object, etc.)
However, when I use upload_file with invalid keys, it raises S3UploadFailedErrror and the only thing in it (that I can tell - I looked at the boto3.s3.transfer code) is a custom message that is created from ClientError ['Code'] and ['Message'] - is something along the lines of - "Failed to upload {file} to {location}: An error occurred (InvalidAccessKeyId) when calling the CreateMultipartUpload operation....."
I'm not sure why a new error was created instead of using ClientError but if you are going to continue to use S3UploadFailedError, can you make it so we can get fields (Error-Code and Error-Message) from it like ClientError instead of just a generic string that I have to manually parse?
Thanks,
Mike
The text was updated successfully, but these errors were encountered: