Skip to content

Commit e0bd701

Browse files
authored
misc: update isEnabledFor of s3-200-errors customization (#1346)
1 parent de6e8f8 commit e0bd701

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

codegen/aws-sdk-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/s3/S3ErrorWith200StatusIntegration.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ private object S3HandleError200ResponseMiddleware : ProtocolMiddleware {
3838
// Instead of playing whack-a-mole broadly apply this interceptor to everything but streaming responses
3939
// which adds a small amount of overhead to response processing.
4040
val output = ctx.model.expectShape(op.output.get())
41-
return output.members().none { it.isStreaming || ctx.model.expectShape(it.target).isStreaming }
41+
return output.members().none {
42+
val isBlob = it.isBlobShape || ctx.model.expectShape(it.target).isBlobShape
43+
val isStreaming = it.isStreaming || ctx.model.expectShape(it.target).isStreaming
44+
isBlob && isStreaming
45+
}
4246
}
4347

4448
override val name: String = "Handle200ErrorsInterceptor"

0 commit comments

Comments
 (0)