@@ -883,33 +883,40 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext):
883
883
throw await de_OverLimitRes ( parsedOutput , context ) ;
884
884
case "QueueDoesNotExist" :
885
885
case "com.amazonaws.sqs#QueueDoesNotExist" :
886
+ case "AWS.SimpleQueueService.NonExistentQueue" :
886
887
throw await de_QueueDoesNotExistRes ( parsedOutput , context ) ;
887
888
case "RequestThrottled" :
888
889
case "com.amazonaws.sqs#RequestThrottled" :
889
890
throw await de_RequestThrottledRes ( parsedOutput , context ) ;
890
891
case "UnsupportedOperation" :
891
892
case "com.amazonaws.sqs#UnsupportedOperation" :
893
+ case "AWS.SimpleQueueService.UnsupportedOperation" :
892
894
throw await de_UnsupportedOperationRes ( parsedOutput , context ) ;
893
895
case "ResourceNotFoundException" :
894
896
case "com.amazonaws.sqs#ResourceNotFoundException" :
895
897
throw await de_ResourceNotFoundExceptionRes ( parsedOutput , context ) ;
896
898
case "MessageNotInflight" :
897
899
case "com.amazonaws.sqs#MessageNotInflight" :
900
+ case "AWS.SimpleQueueService.MessageNotInflight" :
898
901
throw await de_MessageNotInflightRes ( parsedOutput , context ) ;
899
902
case "ReceiptHandleIsInvalid" :
900
903
case "com.amazonaws.sqs#ReceiptHandleIsInvalid" :
901
904
throw await de_ReceiptHandleIsInvalidRes ( parsedOutput , context ) ;
902
905
case "BatchEntryIdsNotDistinct" :
903
906
case "com.amazonaws.sqs#BatchEntryIdsNotDistinct" :
907
+ case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct" :
904
908
throw await de_BatchEntryIdsNotDistinctRes ( parsedOutput , context ) ;
905
909
case "EmptyBatchRequest" :
906
910
case "com.amazonaws.sqs#EmptyBatchRequest" :
911
+ case "AWS.SimpleQueueService.EmptyBatchRequest" :
907
912
throw await de_EmptyBatchRequestRes ( parsedOutput , context ) ;
908
913
case "InvalidBatchEntryId" :
909
914
case "com.amazonaws.sqs#InvalidBatchEntryId" :
915
+ case "AWS.SimpleQueueService.InvalidBatchEntryId" :
910
916
throw await de_InvalidBatchEntryIdRes ( parsedOutput , context ) ;
911
917
case "TooManyEntriesInBatchRequest" :
912
918
case "com.amazonaws.sqs#TooManyEntriesInBatchRequest" :
919
+ case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest" :
913
920
throw await de_TooManyEntriesInBatchRequestRes ( parsedOutput , context ) ;
914
921
case "InvalidAttributeName" :
915
922
case "com.amazonaws.sqs#InvalidAttributeName" :
@@ -919,42 +926,53 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext):
919
926
throw await de_InvalidAttributeValueRes ( parsedOutput , context ) ;
920
927
case "QueueDeletedRecently" :
921
928
case "com.amazonaws.sqs#QueueDeletedRecently" :
929
+ case "AWS.SimpleQueueService.QueueDeletedRecently" :
922
930
throw await de_QueueDeletedRecentlyRes ( parsedOutput , context ) ;
923
931
case "QueueNameExists" :
924
932
case "com.amazonaws.sqs#QueueNameExists" :
933
+ case "QueueAlreadyExists" :
925
934
throw await de_QueueNameExistsRes ( parsedOutput , context ) ;
926
935
case "InvalidIdFormat" :
927
936
case "com.amazonaws.sqs#InvalidIdFormat" :
928
937
throw await de_InvalidIdFormatRes ( parsedOutput , context ) ;
929
938
case "PurgeQueueInProgress" :
930
939
case "com.amazonaws.sqs#PurgeQueueInProgress" :
940
+ case "AWS.SimpleQueueService.PurgeQueueInProgress" :
931
941
throw await de_PurgeQueueInProgressRes ( parsedOutput , context ) ;
932
942
case "KmsAccessDenied" :
933
943
case "com.amazonaws.sqs#KmsAccessDenied" :
944
+ case "KMS.AccessDeniedException" :
934
945
throw await de_KmsAccessDeniedRes ( parsedOutput , context ) ;
935
946
case "KmsDisabled" :
936
947
case "com.amazonaws.sqs#KmsDisabled" :
948
+ case "KMS.DisabledException" :
937
949
throw await de_KmsDisabledRes ( parsedOutput , context ) ;
938
950
case "KmsInvalidKeyUsage" :
939
951
case "com.amazonaws.sqs#KmsInvalidKeyUsage" :
952
+ case "KMS.InvalidKeyUsageException" :
940
953
throw await de_KmsInvalidKeyUsageRes ( parsedOutput , context ) ;
941
954
case "KmsInvalidState" :
942
955
case "com.amazonaws.sqs#KmsInvalidState" :
956
+ case "KMS.InvalidStateException" :
943
957
throw await de_KmsInvalidStateRes ( parsedOutput , context ) ;
944
958
case "KmsNotFound" :
945
959
case "com.amazonaws.sqs#KmsNotFound" :
960
+ case "KMS.NotFoundException" :
946
961
throw await de_KmsNotFoundRes ( parsedOutput , context ) ;
947
962
case "KmsOptInRequired" :
948
963
case "com.amazonaws.sqs#KmsOptInRequired" :
964
+ case "KMS.OptInRequired" :
949
965
throw await de_KmsOptInRequiredRes ( parsedOutput , context ) ;
950
966
case "KmsThrottled" :
951
967
case "com.amazonaws.sqs#KmsThrottled" :
968
+ case "KMS.ThrottlingException" :
952
969
throw await de_KmsThrottledRes ( parsedOutput , context ) ;
953
970
case "InvalidMessageContents" :
954
971
case "com.amazonaws.sqs#InvalidMessageContents" :
955
972
throw await de_InvalidMessageContentsRes ( parsedOutput , context ) ;
956
973
case "BatchRequestTooLong" :
957
974
case "com.amazonaws.sqs#BatchRequestTooLong" :
975
+ case "AWS.SimpleQueueService.BatchRequestTooLong" :
958
976
throw await de_BatchRequestTooLongRes ( parsedOutput , context ) ;
959
977
default :
960
978
const parsedBody = parsedOutput . body ;
@@ -2094,8 +2112,17 @@ function sharedHeaders(operation: string): __HeaderBag {
2094
2112
const populateBodyWithQueryCompatibility = ( parsedOutput : any , headers : __HeaderBag ) => {
2095
2113
const queryErrorHeader = headers [ "x-amzn-query-error" ] ;
2096
2114
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 ;
2100
2127
}
2101
2128
} ;
0 commit comments