{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-go/issues/542","repository_url":"https://api.github.com/repos/aws/aws-sdk-go","labels_url":"https://api.github.com/repos/aws/aws-sdk-go/issues/542/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-go/issues/542/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-go/issues/542/events","html_url":"https://github.com/aws/aws-sdk-go/issues/542","id":131888707,"number":542,"title":"s3 error xml","user":{"login":"kahing","id":1772540,"avatar_url":"https://avatars.githubusercontent.com/u/1772540?v=3","gravatar_id":"","url":"https://api.github.com/users/kahing","html_url":"https://github.com/kahing","followers_url":"https://api.github.com/users/kahing/followers","following_url":"https://api.github.com/users/kahing/following{/other_user}","gists_url":"https://api.github.com/users/kahing/gists{/gist_id}","starred_url":"https://api.github.com/users/kahing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kahing/subscriptions","organizations_url":"https://api.github.com/users/kahing/orgs","repos_url":"https://api.github.com/users/kahing/repos","events_url":"https://api.github.com/users/kahing/events{/privacy}","received_events_url":"https://api.github.com/users/kahing/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aws/aws-sdk-go/labels/Question","name":"Question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"xibz","id":1964445,"avatar_url":"https://avatars.githubusercontent.com/u/1964445?v=3","gravatar_id":"","url":"https://api.github.com/users/xibz","html_url":"https://github.com/xibz","followers_url":"https://api.github.com/users/xibz/followers","following_url":"https://api.github.com/users/xibz/following{/other_user}","gists_url":"https://api.github.com/users/xibz/gists{/gist_id}","starred_url":"https://api.github.com/users/xibz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xibz/subscriptions","organizations_url":"https://api.github.com/users/xibz/orgs","repos_url":"https://api.github.com/users/xibz/repos","events_url":"https://api.github.com/users/xibz/events{/privacy}","received_events_url":"https://api.github.com/users/xibz/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2016-02-06T19:02:32Z","updated_at":"2016-02-06T23:32:20Z","closed_at":null,"body":"when we get an s3 error it's automatically unmarshalled: https://github.com/aws/aws-sdk-go/blob/master/service/s3/unmarshal_error.go which hides the original XML error message. In some case we want the original error, for example on a 301 we want to see what the correct bucket location should be. awserr.Error has an OrigErr() function but that field is always initialized to nil."},"comment":{"url":"https://api.github.com/repos/aws/aws-sdk-go/issues/comments/180885607","html_url":"https://github.com/aws/aws-sdk-go/issues/542#issuecomment-180885607","issue_url":"https://api.github.com/repos/aws/aws-sdk-go/issues/542","id":180885607,"user":{"login":"xibz","id":1964445,"avatar_url":"https://avatars.githubusercontent.com/u/1964445?v=3","gravatar_id":"","url":"https://api.github.com/users/xibz","html_url":"https://github.com/xibz","followers_url":"https://api.github.com/users/xibz/followers","following_url":"https://api.github.com/users/xibz/following{/other_user}","gists_url":"https://api.github.com/users/xibz/gists{/gist_id}","starred_url":"https://api.github.com/users/xibz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xibz/subscriptions","organizations_url":"https://api.github.com/users/xibz/orgs","repos_url":"https://api.github.com/users/xibz/repos","events_url":"https://api.github.com/users/xibz/events{/privacy}","received_events_url":"https://api.github.com/users/xibz/received_events","type":"User","site_admin":false},"created_at":"2016-02-06T23:32:20Z","updated_at":"2016-02-06T23:32:20Z","body":"That's a good question. I believe it is because we know S3 will always return the XMLName, Code, and Message, but unsure about Region and others. So, with that said, if users want to grab very specific data from the XML, that may only happen in one or two requests, we can provide handlers for them to grab what they know will be in them. Let us know if you have any more questions, I'll be glad to help. Thank you, @kahing, again for reaching out"}}