payload: {"action":"created","comment":{"url":"https://api.github.com/repos/aws/aws-sdk-java-v2/pulls/comments/362268032","pull_request_review_id":337427834,"id":362268032,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM2MjI2ODAzMg==","diff_hunk":"@@ -0,0 +1,172 @@\n+/*\n+ * Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\").\n+ * You may not use this file except in compliance with the License.\n+ * A copy of the License is located at\n+ *\n+ *  http://aws.amazon.com/apache2.0\n+ *\n+ * or in the \"license\" file accompanying this file. This file is distributed\n+ * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either\n+ * express or implied. See the License for the specific language governing\n+ * permissions and limitations under the License.\n+ */\n+\n+package software.amazon.awssdk.core;\n+\n+import software.amazon.awssdk.annotations.SdkProtectedApi;\n+import software.amazon.awssdk.core.exception.SdkException;\n+import software.amazon.awssdk.http.SdkHttpFullResponse;\n+\n+/**\n+ * Response wrapper that indicates success or failure with the associated unmarshalled response object or exception\n+ * object. This object is used by the core request/response pipeline to pass response metadata alongside the actual\n+ * deserialized response object through different stages of the pipeline.\n+ *\n+ * @param <T> the modelled SDK response type.\n+ */\n+@SdkProtectedApi","path":"core/sdk-core/src/main/java/software/amazon/awssdk/core/Response.java","position":29,"original_position":29,"commit_id":"62973dc8d5efd1d61638f56429afa3405a339bac","original_commit_id":"62973dc8d5efd1d61638f56429afa3405a339bac","user":{"login":"zoewangg","id":33073555,"node_id":"MDQ6VXNlcjMzMDczNTU1","avatar_url":"https://avatars3.githubusercontent.com/u/33073555?v=4","gravatar_id":"","url":"https://api.github.com/users/zoewangg","html_url":"https://github.com/zoewangg","followers_url":"https://api.github.com/users/zoewangg/followers","following_url":"https://api.github.com/users/zoewangg/following{/other_user}","gists_url":"https://api.github.com/users/zoewangg/gists{/gist_id}","starred_url":"https://api.github.com/users/zoewangg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoewangg/subscriptions","organizations_url":"https://api.github.com/users/zoewangg/orgs","repos_url":"https://api.github.com/users/zoewangg/repos","events_url":"https://api.github.com/users/zoewangg/events{/privacy}","received_events_url":"https://api.github.com/users/zoewangg/received_events","type":"User","site_admin":false},"body":"internal api?","created_at":"2019-12-31T19:20:12Z","updated_at":"2019-12-31T19:40:57Z","html_url":"https://github.com/aws/aws-sdk-java-v2/pull/1554#discussion_r362268032","pull_request_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/pulls/1554","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/aws/aws-sdk-java-v2/pulls/comments/362268032"},"html":{"href":"https://github.com/aws/aws-sdk-java-v2/pull/1554#discussion_r362268032"},"pull_request":{"href":"https://api.github.com/repos/aws/aws-sdk-java-v2/pulls/1554"}}},"pull_request":{"url":"https://api.github.com/repos/aws/aws-sdk-java-v2/pulls/1554","id":355510545,"node_id":"MDExOlB1bGxSZXF1ZXN0MzU1NTEwNTQ1","html_url":"https://github.com/aws/aws-sdk-java-v2/pull/1554","diff_url":"https://github.com/aws/aws-sdk-java-v2/pull/1554.diff","patch_url":"https://github.com/aws/aws-sdk-java-v2/pull/1554.patch","issue_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/issues/1554","number":1554,"state":"open","locked":false,"title":"AWS-XML: Support for handling error in response body with success HTT…","user":{"login":"bmaizels","id":36682168,"node_id":"MDQ6VXNlcjM2NjgyMTY4","avatar_url":"https://avatars1.githubusercontent.com/u/36682168?v=4","gravatar_id":"","url":"https://api.github.com/users/bmaizels","html_url":"https://github.com/bmaizels","followers_url":"https://api.github.com/users/bmaizels/followers","following_url":"https://api.github.com/users/bmaizels/following{/other_user}","gists_url":"https://api.github.com/users/bmaizels/gists{/gist_id}","starred_url":"https://api.github.com/users/bmaizels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmaizels/subscriptions","organizations_url":"https://api.github.com/users/bmaizels/orgs","repos_url":"https://api.github.com/users/bmaizels/repos","events_url":"https://api.github.com/users/bmaizels/events{/privacy}","received_events_url":"https://api.github.com/users/bmaizels/received_events","type":"User","site_admin":false},"body":"…P code for all non-streaming requests.\r\n\r\nS3 uses AWS XML protocol. Some S3 operations will very occasionally return a serialized error in the XML body of an HTTP response that has a status code of 200. This change refactors the core response pipeline to delegate responsibility for determining whether a response is an error or not upstream to the protocol handler so special logic could be inserted for S3 to deal with this specific and unusual use-case.\r\n\r\nTODO checklist (do not merge until these are all gone):\r\n- Wrap the inputStream with a capturing input stream so that the raw response can be inserted into the exception.\r\n- Performance testing/tuning/optimization.\r\n- Stability/canary testing.\r\n\r\n## Motivation and Context\r\nOccasionally S3 will respond with an HTTP status 200 but with a serialized error in the XML payload. Before this change, the SDK would incorrectly report such a response as a success.\r\n\r\nInitially we considered adding this as an interceptor, however that would have required us to proactively parse the XML to check for an error, somehow reset the input stream and then re-parse the response body for every operation that might have an error in the body and we didn't want to take the performance hit of doing that.\r\n\r\n## Testing\r\nAdded unit test for the problem case. Ran all existing unit tests, and integration tests for S3.\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [X] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n\r\n## Checklist\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [X] I have read the **CONTRIBUTING** document\r\n- [X] Local run of `mvn install` succeeds\r\n- [X] My code follows the code style of this project\r\n- [X] My change requires a change to the Javadoc documentation\r\n- [X] I have updated the Javadoc documentation accordingly\r\n- [X] I have read the **README** document\r\n- [X] I have added tests to cover my changes\r\n- [X] All new and existing tests passed\r\n- [x] A short description of the change has been added to the **CHANGELOG**\r\n- [ ] My change is to implement 1.11 parity feature and I have updated [LaunchChangelog](https://github.com/aws/aws-sdk-java-v2/blob/master/docs/LaunchChangelog.md)\r\n\r\n## License\r\n<!--- The SDK is released under the Apache 2.0 license (http://aws.amazon.com/apache2.0/), so any code you submit will be released under that license -->\r\n<!--- For substantial contributions, we may ask you to sign a Contributor License Agreement (http://en.wikipedia.org/wiki/Contributor_License_Agreement) -->\r\n<!--- Put an `x` in the below box if you confirm that this request can be released under the Apache 2 license -->\r\n- [X] I confirm that this pull request can be released under the Apache 2 license\r\n","created_at":"2019-12-20T03:59:23Z","updated_at":"2019-12-31T19:40:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f9bdaa090df827f426d8c340f23aebce58ea90a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/pulls/1554/commits","review_comments_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/pulls/1554/comments","review_comment_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/issues/1554/comments","statuses_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/statuses/62973dc8d5efd1d61638f56429afa3405a339bac","head":{"label":"aws:bmaizels/master-s3-error-in-response-body","ref":"bmaizels/master-s3-error-in-response-body","sha":"62973dc8d5efd1d61638f56429afa3405a339bac","user":{"login":"aws","id":2232217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzIyMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/2232217?v=4","gravatar_id":"","url":"https://api.github.com/users/aws","html_url":"https://github.com/aws","followers_url":"https://api.github.com/users/aws/followers","following_url":"https://api.github.com/users/aws/following{/other_user}","gists_url":"https://api.github.com/users/aws/gists{/gist_id}","starred_url":"https://api.github.com/users/aws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws/subscriptions","organizations_url":"https://api.github.com/users/aws/orgs","repos_url":"https://api.github.com/users/aws/repos","events_url":"https://api.github.com/users/aws/events{/privacy}","received_events_url":"https://api.github.com/users/aws/received_events","type":"Organization","site_admin":false},"repo":{"id":95247959,"node_id":"MDEwOlJlcG9zaXRvcnk5NTI0Nzk1OQ==","name":"aws-sdk-java-v2","full_name":"aws/aws-sdk-java-v2","private":false,"owner":{"login":"aws","id":2232217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzIyMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/2232217?v=4","gravatar_id":"","url":"https://api.github.com/users/aws","html_url":"https://github.com/aws","followers_url":"https://api.github.com/users/aws/followers","following_url":"https://api.github.com/users/aws/following{/other_user}","gists_url":"https://api.github.com/users/aws/gists{/gist_id}","starred_url":"https://api.github.com/users/aws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws/subscriptions","organizations_url":"https://api.github.com/users/aws/orgs","repos_url":"https://api.github.com/users/aws/repos","events_url":"https://api.github.com/users/aws/events{/privacy}","received_events_url":"https://api.github.com/users/aws/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/aws/aws-sdk-java-v2","description":"The official AWS SDK for Java - Version 2","fork":false,"url":"https://api.github.com/repos/aws/aws-sdk-java-v2","forks_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/forks","keys_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/teams","hooks_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/hooks","issue_events_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/issues/events{/number}","events_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/events","assignees_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/assignees{/user}","branches_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/branches{/branch}","tags_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/tags","blobs_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/git/refs{/sha}","trees_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/statuses/{sha}","languages_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/languages","stargazers_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/stargazers","contributors_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/contributors","subscribers_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/subscribers","subscription_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/subscription","commits_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/commits{/sha}","git_commits_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/git/commits{/sha}","comments_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/comments{/number}","issue_comment_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/issues/comments{/number}","contents_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/contents/{+path}","compare_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/merges","archive_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/downloads","issues_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/issues{/number}","pulls_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/pulls{/number}","milestones_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/milestones{/number}","notifications_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/labels{/name}","releases_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/releases{/id}","deployments_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/deployments","created_at":"2017-06-23T18:56:01Z","updated_at":"2019-12-30T21:38:30Z","pushed_at":"2019-12-31T19:21:30Z","git_url":"git://github.com/aws/aws-sdk-java-v2.git","ssh_url":"git@github.com:aws/aws-sdk-java-v2.git","clone_url":"https://github.com/aws/aws-sdk-java-v2.git","svn_url":"https://github.com/aws/aws-sdk-java-v2","homepage":"","size":94698,"stargazers_count":722,"watchers_count":722,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":241,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":146,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":241,"open_issues":146,"watchers":722,"default_branch":"master"}},"base":{"label":"aws:master","ref":"master","sha":"8077c499ce6e887256079851230b67554fbc0762","user":{"login":"aws","id":2232217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzIyMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/2232217?v=4","gravatar_id":"","url":"https://api.github.com/users/aws","html_url":"https://github.com/aws","followers_url":"https://api.github.com/users/aws/followers","following_url":"https://api.github.com/users/aws/following{/other_user}","gists_url":"https://api.github.com/users/aws/gists{/gist_id}","starred_url":"https://api.github.com/users/aws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws/subscriptions","organizations_url":"https://api.github.com/users/aws/orgs","repos_url":"https://api.github.com/users/aws/repos","events_url":"https://api.github.com/users/aws/events{/privacy}","received_events_url":"https://api.github.com/users/aws/received_events","type":"Organization","site_admin":false},"repo":{"id":95247959,"node_id":"MDEwOlJlcG9zaXRvcnk5NTI0Nzk1OQ==","name":"aws-sdk-java-v2","full_name":"aws/aws-sdk-java-v2","private":false,"owner":{"login":"aws","id":2232217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzIyMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/2232217?v=4","gravatar_id":"","url":"https://api.github.com/users/aws","html_url":"https://github.com/aws","followers_url":"https://api.github.com/users/aws/followers","following_url":"https://api.github.com/users/aws/following{/other_user}","gists_url":"https://api.github.com/users/aws/gists{/gist_id}","starred_url":"https://api.github.com/users/aws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws/subscriptions","organizations_url":"https://api.github.com/users/aws/orgs","repos_url":"https://api.github.com/users/aws/repos","events_url":"https://api.github.com/users/aws/events{/privacy}","received_events_url":"https://api.github.com/users/aws/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/aws/aws-sdk-java-v2","description":"The official AWS SDK for Java - Version 2","fork":false,"url":"https://api.github.com/repos/aws/aws-sdk-java-v2","forks_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/forks","keys_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/teams","hooks_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/hooks","issue_events_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/issues/events{/number}","events_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/events","assignees_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/assignees{/user}","branches_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/branches{/branch}","tags_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/tags","blobs_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/git/refs{/sha}","trees_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/statuses/{sha}","languages_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/languages","stargazers_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/stargazers","contributors_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/contributors","subscribers_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/subscribers","subscription_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/subscription","commits_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/commits{/sha}","git_commits_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/git/commits{/sha}","comments_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/comments{/number}","issue_comment_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/issues/comments{/number}","contents_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/contents/{+path}","compare_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/merges","archive_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/downloads","issues_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/issues{/number}","pulls_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/pulls{/number}","milestones_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/milestones{/number}","notifications_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/labels{/name}","releases_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/releases{/id}","deployments_url":"https://api.github.com/repos/aws/aws-sdk-java-v2/deployments","created_at":"2017-06-23T18:56:01Z","updated_at":"2019-12-30T21:38:30Z","pushed_at":"2019-12-31T19:21:30Z","git_url":"git://github.com/aws/aws-sdk-java-v2.git","ssh_url":"git@github.com:aws/aws-sdk-java-v2.git","clone_url":"https://github.com/aws/aws-sdk-java-v2.git","svn_url":"https://github.com/aws/aws-sdk-java-v2","homepage":"","size":94698,"stargazers_count":722,"watchers_count":722,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":241,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":146,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":241,"open_issues":146,"watchers":722,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aws/aws-sdk-java-v2/pulls/1554"},"html":{"href":"https://github.com/aws/aws-sdk-java-v2/pull/1554"},"issue":{"href":"https://api.github.com/repos/aws/aws-sdk-java-v2/issues/1554"},"comments":{"href":"https://api.github.com/repos/aws/aws-sdk-java-v2/issues/1554/comments"},"review_comments":{"href":"https://api.github.com/repos/aws/aws-sdk-java-v2/pulls/1554/comments"},"review_comment":{"href":"https://api.github.com/repos/aws/aws-sdk-java-v2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aws/aws-sdk-java-v2/pulls/1554/commits"},"statuses":{"href":"https://api.github.com/repos/aws/aws-sdk-java-v2/statuses/62973dc8d5efd1d61638f56429afa3405a339bac"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"zoewangg"}}