diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Protocols/AWSJSON/AWSJSONError.swift b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Protocols/AWSJSON/AWSJSONError.swift index fd395181620..6dd4fbc0194 100644 --- a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Protocols/AWSJSON/AWSJSONError.swift +++ b/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Protocols/AWSJSON/AWSJSONError.swift @@ -37,7 +37,11 @@ public struct AWSJSONError: BaseError { extension AWSJSONError { public func makeAWSJsonErrorQueryCompatible(errorDetails: String?) throws -> AWSJSONError { - var error = try AWSJSONError(httpResponse: self.httpResponse, responseReader: self.responseReader, noErrorWrapping: false) + var error = try AWSJSONError( + httpResponse: self.httpResponse, + responseReader: self.responseReader, + noErrorWrapping: false // unused + ) error.code = try AwsQueryCompatibleErrorDetails.parse(errorDetails).code return error }