@@ -1019,8 +1019,7 @@ const deserializeAws_json1_1CreateLocationFsxOntapCommandError = async (
1019
1019
body : await parseBody ( output . body , context ) ,
1020
1020
} ;
1021
1021
let response : __BaseException ;
1022
- let errorCode = "UnknownError" ;
1023
- errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ;
1022
+ const errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ;
1024
1023
switch ( errorCode ) {
1025
1024
case "InternalException" :
1026
1025
case "com.amazonaws.datasync#InternalException" :
@@ -1030,10 +1029,12 @@ const deserializeAws_json1_1CreateLocationFsxOntapCommandError = async (
1030
1029
throw await deserializeAws_json1_1InvalidRequestExceptionResponse ( parsedOutput , context ) ;
1031
1030
default :
1032
1031
const parsedBody = parsedOutput . body ;
1032
+ const $metadata = deserializeMetadata ( output ) ;
1033
+ const statusCode = $metadata . httpStatusCode ? $metadata . httpStatusCode + "" : undefined ;
1033
1034
response = new __BaseException ( {
1034
- name : parsedBody . code || parsedBody . Code || errorCode ,
1035
+ name : parsedBody . code || parsedBody . Code || errorCode || statusCode || "UnknowError" ,
1035
1036
$fault : "client" ,
1036
- $metadata : deserializeMetadata ( output ) ,
1037
+ $metadata,
1037
1038
} ) ;
1038
1039
throw __decorateServiceException ( response , parsedBody ) ;
1039
1040
}
@@ -1723,8 +1724,7 @@ const deserializeAws_json1_1DescribeLocationFsxOntapCommandError = async (
1723
1724
body : await parseBody ( output . body , context ) ,
1724
1725
} ;
1725
1726
let response : __BaseException ;
1726
- let errorCode = "UnknownError" ;
1727
- errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ;
1727
+ const errorCode = loadRestJsonErrorCode ( output , parsedOutput . body ) ;
1728
1728
switch ( errorCode ) {
1729
1729
case "InternalException" :
1730
1730
case "com.amazonaws.datasync#InternalException" :
@@ -1734,10 +1734,12 @@ const deserializeAws_json1_1DescribeLocationFsxOntapCommandError = async (
1734
1734
throw await deserializeAws_json1_1InvalidRequestExceptionResponse ( parsedOutput , context ) ;
1735
1735
default :
1736
1736
const parsedBody = parsedOutput . body ;
1737
+ const $metadata = deserializeMetadata ( output ) ;
1738
+ const statusCode = $metadata . httpStatusCode ? $metadata . httpStatusCode + "" : undefined ;
1737
1739
response = new __BaseException ( {
1738
- name : parsedBody . code || parsedBody . Code || errorCode ,
1740
+ name : parsedBody . code || parsedBody . Code || errorCode || statusCode || "UnknowError" ,
1739
1741
$fault : "client" ,
1740
- $metadata : deserializeMetadata ( output ) ,
1742
+ $metadata,
1741
1743
} ) ;
1742
1744
throw __decorateServiceException ( response , parsedBody ) ;
1743
1745
}
0 commit comments