Skip to content

Commit f6cd7ba

Browse files
authored
fix: compiler error in ec2 (#399)
1 parent e22c0fd commit f6cd7ba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/ec2query/httpResponse/AWSEc2QueryHttpResponseBindingErrorGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AWSEc2QueryHttpResponseBindingErrorGenerator : HttpResponseBindingErrorGen
2828
writer.addImport(SwiftDependency.CLIENT_RUNTIME.packageName)
2929

3030
writer.openBlock("extension \$L: \$N {", "}", operationErrorName, ClientRuntimeTypes.Http.HttpResponseBinding) {
31-
writer.openBlock("public init(httpResponse: \$N, decoder: \$D) throws {", "}", ClientRuntimeTypes.Http.HttpBody, ClientRuntimeTypes.Serde.ResponseDecoder) {
31+
writer.openBlock("public init(httpResponse: \$N, decoder: \$D) throws {", "}", ClientRuntimeTypes.Http.HttpResponse, ClientRuntimeTypes.Serde.ResponseDecoder) {
3232
writer.write("let errorDetails = try Ec2QueryError(httpResponse: httpResponse)")
3333
writer.write("try self.init(errorType: errorDetails.errorCode, httpResponse: httpResponse, decoder: decoder, message: errorDetails.message, requestID: errorDetails.requestId)")
3434
}

codegen/smithy-aws-swift-codegen/src/test/kotlin/software/amazon/smithy/aws/swift/codegen/ec2query/Ec2QueryHttpResponseBindingErrorGeneratorTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Ec2QueryHttpResponseBindingErrorGeneratorTests {
3838
val expectedContents =
3939
"""
4040
extension GreetingWithErrorsOutputError: ClientRuntime.HttpResponseBinding {
41-
public init(httpResponse: ClientRuntime.HttpBody, decoder: ClientRuntime.ResponseDecoder? = nil) throws {
41+
public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) throws {
4242
let errorDetails = try Ec2QueryError(httpResponse: httpResponse)
4343
try self.init(errorType: errorDetails.errorCode, httpResponse: httpResponse, decoder: decoder, message: errorDetails.message, requestID: errorDetails.requestId)
4444
}

0 commit comments

Comments
 (0)