Loading codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customize/RequiredCustomizations.kt +2 −2 Original line number Diff line number Diff line Loading @@ -99,13 +99,13 @@ class RequiredCustomizations : ClientCodegenDecorator { rust("/// Error type returned by the client.") if (codegenContext.smithyRuntimeMode.generateOrchestrator) { rustTemplate( "pub type SdkError<E> = #{SdkError}<E, #{R}>;", "pub type SdkError<E, R = #{R}> = #{SdkError}<E, R>;", "SdkError" to RuntimeType.sdkError(rc), "R" to RuntimeType.smithyRuntimeApi(rc).resolve("client::orchestrator::HttpResponse"), ) } else { rustTemplate( "pub type SdkError<E> = #{SdkError}<E, #{R}>;", "pub type SdkError<E, R = #{R}> = #{SdkError}<E, R>;", "SdkError" to RuntimeType.sdkError(rc), "R" to RuntimeType.smithyHttp(rc).resolve("operation::Response"), ) Loading codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/ServerRequiredCustomizations.kt +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ class ServerRequiredCustomizations : ServerCodegenDecorator { // TODO(enableNewSmithyRuntimeCleanup): Remove re-export of SdkError in server and add changelog entry rustTemplate( """ pub type SdkError<E> = #{SdkError}<E, #{Response}>; pub type SdkError<E, R = #{Response}> = #{SdkError}<E, R>; pub use #{DisplayErrorContext}; """, "SdkError" to RuntimeType.smithyHttp(rc).resolve("result::SdkError"), Loading Loading
codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customize/RequiredCustomizations.kt +2 −2 Original line number Diff line number Diff line Loading @@ -99,13 +99,13 @@ class RequiredCustomizations : ClientCodegenDecorator { rust("/// Error type returned by the client.") if (codegenContext.smithyRuntimeMode.generateOrchestrator) { rustTemplate( "pub type SdkError<E> = #{SdkError}<E, #{R}>;", "pub type SdkError<E, R = #{R}> = #{SdkError}<E, R>;", "SdkError" to RuntimeType.sdkError(rc), "R" to RuntimeType.smithyRuntimeApi(rc).resolve("client::orchestrator::HttpResponse"), ) } else { rustTemplate( "pub type SdkError<E> = #{SdkError}<E, #{R}>;", "pub type SdkError<E, R = #{R}> = #{SdkError}<E, R>;", "SdkError" to RuntimeType.sdkError(rc), "R" to RuntimeType.smithyHttp(rc).resolve("operation::Response"), ) Loading
codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/ServerRequiredCustomizations.kt +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ class ServerRequiredCustomizations : ServerCodegenDecorator { // TODO(enableNewSmithyRuntimeCleanup): Remove re-export of SdkError in server and add changelog entry rustTemplate( """ pub type SdkError<E> = #{SdkError}<E, #{Response}>; pub type SdkError<E, R = #{Response}> = #{SdkError}<E, R>; pub use #{DisplayErrorContext}; """, "SdkError" to RuntimeType.smithyHttp(rc).resolve("result::SdkError"), Loading