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
Improve error messages for S3 HeadObject #227
Comments
We could potentially generate an error message from the status code if no other message, but this is a bit risky because status codes aren't always used correctly. Unfortunately, in this particular case, S3 isn't actually sending back anything other than a 403 anywhere in the response, so there's nothing the SDK can do here from the data we have. |
It would be great if the SDK could last least return Looking at the output of
But I guess the string isn't used by the Rust SDK right now? Error output of the CLI:
I'm also pretty sure that the Go SDK returns "AccessDenied" too. |
The problem seems to be exclusive to
When I run put_object, I get a proper error with
Can you verify you see that as well? If not, I wonder if the anyhow chain is dropping the error.
|
note for maintainers: |
You're absolutely right! I just found it in the CLI docs as well:
I also confirmed that it's not a problem with other API calls like
Agreed. 👍🏻 |
Comments on closed issues are hard for our team to see. |
While adding logging context to one of my projects, I noticed that both
put_object
andhead_object
only return a generic "Error" when lacking permissions (403). I would expect to see at least the string "forbidden" somewhere in the error message.Here's the complete anyhow error chain from CloudWatch:
Returning the error from Lambda currently results in:
The text was updated successfully, but these errors were encountered: