Skip to content

Commit

Permalink
misc: update isEnabledFor of s3-200-errors customization (#1346)
Browse files Browse the repository at this point in the history
  • Loading branch information
lauzadis authored Jul 3, 2024
1 parent de6e8f8 commit e0bd701
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ private object S3HandleError200ResponseMiddleware : ProtocolMiddleware {
// Instead of playing whack-a-mole broadly apply this interceptor to everything but streaming responses
// which adds a small amount of overhead to response processing.
val output = ctx.model.expectShape(op.output.get())
return output.members().none { it.isStreaming || ctx.model.expectShape(it.target).isStreaming }
return output.members().none {
val isBlob = it.isBlobShape || ctx.model.expectShape(it.target).isBlobShape
val isStreaming = it.isStreaming || ctx.model.expectShape(it.target).isStreaming
isBlob && isStreaming
}
}

override val name: String = "Handle200ErrorsInterceptor"
Expand Down

0 comments on commit e0bd701

Please sign in to comment.