Skip to content

fix(client-s3): throw errors with 200 status code#1657

Merged
AllanZhengYP merged 1 commit intoaws:masterfrom
AllanZhengYP:s3-200-exceptions
Nov 6, 2020
Merged

fix(client-s3): throw errors with 200 status code#1657
AllanZhengYP merged 1 commit intoaws:masterfrom
AllanZhengYP:s3-200-exceptions

Conversation

@AllanZhengYP
Copy link
Contributor

Issue #, if available:
In case of internal error or connection termination, some S3 operations(CopyObject, UploadPartCopy, CompleteMultiPartUpload) may return error with 200 status code. The change adds customization to throw exceptions when:

  1. Status code is 200 but body contains <Error>;
  2. Status code is 200 but body is empty(connection terminated);

Related PR: aws/aws-sdk-js#3259

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-io
Copy link

Codecov Report

Merging #1657 (8e81e65) into master (de75f7e) will decrease coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1657      +/-   ##
==========================================
- Coverage   79.77%   79.71%   -0.07%     
==========================================
  Files         325      328       +3     
  Lines       12087    12573     +486     
  Branches     2553     2670     +117     
==========================================
+ Hits         9643    10022     +379     
- Misses       2444     2551     +107     
Impacted Files Coverage Δ
...tocol_tests/aws-restxml/commands/XmlMapsCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
...ocol_tests/aws-restxml/commands/XmlBlobsCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
...ocol_tests/aws-restxml/commands/XmlEnumsCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
...ocol_tests/aws-restxml/commands/XmlListsCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
...col_tests/aws-restjson/commands/JsonMapsCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
...ol_tests/aws-restjson/commands/JsonBlobsCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
...ol_tests/aws-restjson/commands/JsonEnumsCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
...ol_tests/aws-restjson/commands/JsonListsCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
...tests/aws-restxml/commands/XmlAttributesCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
...tests/aws-restxml/commands/XmlNamespacesCommand.ts 95.65% <0.00%> (-4.35%) ⬇️
... and 100 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 706768d...e514ca2. Read the comment docs.

@AllanZhengYP AllanZhengYP merged commit abed452 into aws:master Nov 6, 2020
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants