@@ -883,33 +883,40 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext):
883883 throw await de_OverLimitRes ( parsedOutput , context ) ;
884884 case "QueueDoesNotExist" :
885885 case "com.amazonaws.sqs#QueueDoesNotExist" :
886+ case "AWS.SimpleQueueService.NonExistentQueue" :
886887 throw await de_QueueDoesNotExistRes ( parsedOutput , context ) ;
887888 case "RequestThrottled" :
888889 case "com.amazonaws.sqs#RequestThrottled" :
889890 throw await de_RequestThrottledRes ( parsedOutput , context ) ;
890891 case "UnsupportedOperation" :
891892 case "com.amazonaws.sqs#UnsupportedOperation" :
893+ case "AWS.SimpleQueueService.UnsupportedOperation" :
892894 throw await de_UnsupportedOperationRes ( parsedOutput , context ) ;
893895 case "ResourceNotFoundException" :
894896 case "com.amazonaws.sqs#ResourceNotFoundException" :
895897 throw await de_ResourceNotFoundExceptionRes ( parsedOutput , context ) ;
896898 case "MessageNotInflight" :
897899 case "com.amazonaws.sqs#MessageNotInflight" :
900+ case "AWS.SimpleQueueService.MessageNotInflight" :
898901 throw await de_MessageNotInflightRes ( parsedOutput , context ) ;
899902 case "ReceiptHandleIsInvalid" :
900903 case "com.amazonaws.sqs#ReceiptHandleIsInvalid" :
901904 throw await de_ReceiptHandleIsInvalidRes ( parsedOutput , context ) ;
902905 case "BatchEntryIdsNotDistinct" :
903906 case "com.amazonaws.sqs#BatchEntryIdsNotDistinct" :
907+ case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct" :
904908 throw await de_BatchEntryIdsNotDistinctRes ( parsedOutput , context ) ;
905909 case "EmptyBatchRequest" :
906910 case "com.amazonaws.sqs#EmptyBatchRequest" :
911+ case "AWS.SimpleQueueService.EmptyBatchRequest" :
907912 throw await de_EmptyBatchRequestRes ( parsedOutput , context ) ;
908913 case "InvalidBatchEntryId" :
909914 case "com.amazonaws.sqs#InvalidBatchEntryId" :
915+ case "AWS.SimpleQueueService.InvalidBatchEntryId" :
910916 throw await de_InvalidBatchEntryIdRes ( parsedOutput , context ) ;
911917 case "TooManyEntriesInBatchRequest" :
912918 case "com.amazonaws.sqs#TooManyEntriesInBatchRequest" :
919+ case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest" :
913920 throw await de_TooManyEntriesInBatchRequestRes ( parsedOutput , context ) ;
914921 case "InvalidAttributeName" :
915922 case "com.amazonaws.sqs#InvalidAttributeName" :
@@ -919,42 +926,53 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext):
919926 throw await de_InvalidAttributeValueRes ( parsedOutput , context ) ;
920927 case "QueueDeletedRecently" :
921928 case "com.amazonaws.sqs#QueueDeletedRecently" :
929+ case "AWS.SimpleQueueService.QueueDeletedRecently" :
922930 throw await de_QueueDeletedRecentlyRes ( parsedOutput , context ) ;
923931 case "QueueNameExists" :
924932 case "com.amazonaws.sqs#QueueNameExists" :
933+ case "QueueAlreadyExists" :
925934 throw await de_QueueNameExistsRes ( parsedOutput , context ) ;
926935 case "InvalidIdFormat" :
927936 case "com.amazonaws.sqs#InvalidIdFormat" :
928937 throw await de_InvalidIdFormatRes ( parsedOutput , context ) ;
929938 case "PurgeQueueInProgress" :
930939 case "com.amazonaws.sqs#PurgeQueueInProgress" :
940+ case "AWS.SimpleQueueService.PurgeQueueInProgress" :
931941 throw await de_PurgeQueueInProgressRes ( parsedOutput , context ) ;
932942 case "KmsAccessDenied" :
933943 case "com.amazonaws.sqs#KmsAccessDenied" :
944+ case "KMS.AccessDeniedException" :
934945 throw await de_KmsAccessDeniedRes ( parsedOutput , context ) ;
935946 case "KmsDisabled" :
936947 case "com.amazonaws.sqs#KmsDisabled" :
948+ case "KMS.DisabledException" :
937949 throw await de_KmsDisabledRes ( parsedOutput , context ) ;
938950 case "KmsInvalidKeyUsage" :
939951 case "com.amazonaws.sqs#KmsInvalidKeyUsage" :
952+ case "KMS.InvalidKeyUsageException" :
940953 throw await de_KmsInvalidKeyUsageRes ( parsedOutput , context ) ;
941954 case "KmsInvalidState" :
942955 case "com.amazonaws.sqs#KmsInvalidState" :
956+ case "KMS.InvalidStateException" :
943957 throw await de_KmsInvalidStateRes ( parsedOutput , context ) ;
944958 case "KmsNotFound" :
945959 case "com.amazonaws.sqs#KmsNotFound" :
960+ case "KMS.NotFoundException" :
946961 throw await de_KmsNotFoundRes ( parsedOutput , context ) ;
947962 case "KmsOptInRequired" :
948963 case "com.amazonaws.sqs#KmsOptInRequired" :
964+ case "KMS.OptInRequired" :
949965 throw await de_KmsOptInRequiredRes ( parsedOutput , context ) ;
950966 case "KmsThrottled" :
951967 case "com.amazonaws.sqs#KmsThrottled" :
968+ case "KMS.ThrottlingException" :
952969 throw await de_KmsThrottledRes ( parsedOutput , context ) ;
953970 case "InvalidMessageContents" :
954971 case "com.amazonaws.sqs#InvalidMessageContents" :
955972 throw await de_InvalidMessageContentsRes ( parsedOutput , context ) ;
956973 case "BatchRequestTooLong" :
957974 case "com.amazonaws.sqs#BatchRequestTooLong" :
975+ case "AWS.SimpleQueueService.BatchRequestTooLong" :
958976 throw await de_BatchRequestTooLongRes ( parsedOutput , context ) ;
959977 default :
960978 const parsedBody = parsedOutput . body ;
@@ -2094,8 +2112,17 @@ function sharedHeaders(operation: string): __HeaderBag {
20942112const populateBodyWithQueryCompatibility = ( parsedOutput : any , headers : __HeaderBag ) => {
20952113 const queryErrorHeader = headers [ "x-amzn-query-error" ] ;
20962114 if ( parsedOutput . body !== undefined && queryErrorHeader != null ) {
2097- const codeAndType = queryErrorHeader . split ( ";" ) ;
2098- parsedOutput . body . Code = codeAndType [ 0 ] ;
2099- parsedOutput . body . Type = codeAndType [ 1 ] ;
2115+ const [ Code , Type ] = queryErrorHeader . split ( ";" ) ;
2116+ const entries = Object . entries ( parsedOutput . body ) ;
2117+ const Error = {
2118+ Type,
2119+ Code,
2120+ } as any ;
2121+ Object . assign ( parsedOutput . body , Error ) ;
2122+ for ( const [ k , v ] of entries ) {
2123+ Error [ k ] = v ;
2124+ }
2125+ delete Error . __type ;
2126+ parsedOutput . body . Error = Error ;
21002127 }
21012128} ;
0 commit comments