Skip to content

Commit 9119ae6

Browse files
authored
chore(middleware-sdk-s3): update s3 status 200 error handling (#6232)
* chore(middleware-sdk-s3): update s3 status 200 error handling * fix(middleware-sdk-s3): only check tail bytes in s3-200-errors * chore(middleware-sdk-s3): use splitStream utility function to inspect 200-error
1 parent 9ca8bae commit 9119ae6

File tree

61 files changed

+276
-46
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+276
-46
lines changed

clients/client-s3/src/commands/AbortMultipartUploadCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { getThrow200ExceptionsPlugin } from "@aws-sdk/middleware-sdk-s3";
23
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
34
import { getSerdePlugin } from "@smithy/middleware-serde";
45
import { Command as $Command } from "@smithy/smithy-client";
@@ -164,6 +165,7 @@ export class AbortMultipartUploadCommand extends $Command
164165
return [
165166
getSerdePlugin(config, this.serialize, this.deserialize),
166167
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
168+
getThrow200ExceptionsPlugin(config),
167169
];
168170
})
169171
.s("AmazonS3", "AbortMultipartUpload", {})

clients/client-s3/src/commands/CreateBucketCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// smithy-typescript generated code
22
import { getLocationConstraintPlugin } from "@aws-sdk/middleware-location-constraint";
3+
import { getThrow200ExceptionsPlugin } from "@aws-sdk/middleware-sdk-s3";
34
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
45
import { getSerdePlugin } from "@smithy/middleware-serde";
56
import { Command as $Command } from "@smithy/smithy-client";
@@ -272,6 +273,7 @@ export class CreateBucketCommand extends $Command
272273
return [
273274
getSerdePlugin(config, this.serialize, this.deserialize),
274275
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
276+
getThrow200ExceptionsPlugin(config),
275277
getLocationConstraintPlugin(config),
276278
];
277279
})

clients/client-s3/src/commands/CreateMultipartUploadCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { getThrow200ExceptionsPlugin } from "@aws-sdk/middleware-sdk-s3";
23
import { getSsecPlugin } from "@aws-sdk/middleware-ssec";
34
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
45
import { getSerdePlugin } from "@smithy/middleware-serde";
@@ -358,6 +359,7 @@ export class CreateMultipartUploadCommand extends $Command
358359
return [
359360
getSerdePlugin(config, this.serialize, this.deserialize),
360361
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
362+
getThrow200ExceptionsPlugin(config),
361363
getSsecPlugin(config),
362364
];
363365
})

clients/client-s3/src/commands/CreateSessionCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { getThrow200ExceptionsPlugin } from "@aws-sdk/middleware-sdk-s3";
23
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
34
import { getSerdePlugin } from "@smithy/middleware-serde";
45
import { Command as $Command } from "@smithy/smithy-client";
@@ -146,6 +147,7 @@ export class CreateSessionCommand extends $Command
146147
return [
147148
getSerdePlugin(config, this.serialize, this.deserialize),
148149
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
150+
getThrow200ExceptionsPlugin(config),
149151
];
150152
})
151153
.s("AmazonS3", "CreateSession", {})

clients/client-s3/src/commands/DeleteObjectCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { getThrow200ExceptionsPlugin } from "@aws-sdk/middleware-sdk-s3";
23
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
34
import { getSerdePlugin } from "@smithy/middleware-serde";
45
import { Command as $Command } from "@smithy/smithy-client";
@@ -204,6 +205,7 @@ export class DeleteObjectCommand extends $Command
204205
return [
205206
getSerdePlugin(config, this.serialize, this.deserialize),
206207
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
208+
getThrow200ExceptionsPlugin(config),
207209
];
208210
})
209211
.s("AmazonS3", "DeleteObject", {})

clients/client-s3/src/commands/DeleteObjectTaggingCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { getThrow200ExceptionsPlugin } from "@aws-sdk/middleware-sdk-s3";
23
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
34
import { getSerdePlugin } from "@smithy/middleware-serde";
45
import { Command as $Command } from "@smithy/smithy-client";
@@ -133,6 +134,7 @@ export class DeleteObjectTaggingCommand extends $Command
133134
return [
134135
getSerdePlugin(config, this.serialize, this.deserialize),
135136
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
137+
getThrow200ExceptionsPlugin(config),
136138
];
137139
})
138140
.s("AmazonS3", "DeleteObjectTagging", {})

clients/client-s3/src/commands/DeleteObjectsCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// smithy-typescript generated code
22
import { getFlexibleChecksumsPlugin } from "@aws-sdk/middleware-flexible-checksums";
3+
import { getThrow200ExceptionsPlugin } from "@aws-sdk/middleware-sdk-s3";
34
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
45
import { getSerdePlugin } from "@smithy/middleware-serde";
56
import { Command as $Command } from "@smithy/smithy-client";
@@ -305,6 +306,7 @@ export class DeleteObjectsCommand extends $Command
305306
return [
306307
getSerdePlugin(config, this.serialize, this.deserialize),
307308
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
309+
getThrow200ExceptionsPlugin(config),
308310
getFlexibleChecksumsPlugin(config, {
309311
input: this.input,
310312
requestAlgorithmMember: "ChecksumAlgorithm",

clients/client-s3/src/commands/GetBucketAccelerateConfigurationCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { getThrow200ExceptionsPlugin } from "@aws-sdk/middleware-sdk-s3";
23
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
34
import { getSerdePlugin } from "@smithy/middleware-serde";
45
import { Command as $Command } from "@smithy/smithy-client";
@@ -110,6 +111,7 @@ export class GetBucketAccelerateConfigurationCommand extends $Command
110111
return [
111112
getSerdePlugin(config, this.serialize, this.deserialize),
112113
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
114+
getThrow200ExceptionsPlugin(config),
113115
];
114116
})
115117
.s("AmazonS3", "GetBucketAccelerateConfiguration", {})

clients/client-s3/src/commands/GetBucketAclCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { getThrow200ExceptionsPlugin } from "@aws-sdk/middleware-sdk-s3";
23
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
34
import { getSerdePlugin } from "@smithy/middleware-serde";
45
import { Command as $Command } from "@smithy/smithy-client";
@@ -118,6 +119,7 @@ export class GetBucketAclCommand extends $Command
118119
return [
119120
getSerdePlugin(config, this.serialize, this.deserialize),
120121
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
122+
getThrow200ExceptionsPlugin(config),
121123
];
122124
})
123125
.s("AmazonS3", "GetBucketAcl", {})

clients/client-s3/src/commands/GetBucketAnalyticsConfigurationCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// smithy-typescript generated code
2+
import { getThrow200ExceptionsPlugin } from "@aws-sdk/middleware-sdk-s3";
23
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
34
import { getSerdePlugin } from "@smithy/middleware-serde";
45
import { Command as $Command } from "@smithy/smithy-client";
@@ -143,6 +144,7 @@ export class GetBucketAnalyticsConfigurationCommand extends $Command
143144
return [
144145
getSerdePlugin(config, this.serialize, this.deserialize),
145146
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
147+
getThrow200ExceptionsPlugin(config),
146148
];
147149
})
148150
.s("AmazonS3", "GetBucketAnalyticsConfiguration", {})

0 commit comments

Comments
 (0)