diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt index 7530438afc4..02234ac8c87 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt @@ -452,7 +452,7 @@ class ServerProtocolTestGenerator( """ let mut http_request = #{SmithyHttpServer}::request::RequestParts::new(http_request); let rejection = super::$operationName::from_request(&mut http_request).await.expect_err("request was accepted but we expected it to be rejected"); - let http_response = rejection.into_response(); + let http_response = #{SmithyHttpServer}::response::IntoResponse::into_response(rejection); """, *codegenScope, )