@aws-sdk/client-apigatewayv2 3.180.0 → 3.181.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
12
+ * **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
13
+
14
+
15
+
16
+
17
+
6
18
  # [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
7
19
 
8
20
  **Note:** Version bump only for package @aws-sdk/client-apigatewayv2
@@ -1816,7 +1816,7 @@ exports.deserializeAws_restJson1CreateApiCommand = deserializeAws_restJson1Creat
1816
1816
  const deserializeAws_restJson1CreateApiCommandError = async (output, context) => {
1817
1817
  const parsedOutput = {
1818
1818
  ...output,
1819
- body: await parseBody(output.body, context),
1819
+ body: await parseErrorBody(output.body, context),
1820
1820
  };
1821
1821
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1822
1822
  switch (errorCode) {
@@ -1868,7 +1868,7 @@ exports.deserializeAws_restJson1CreateApiMappingCommand = deserializeAws_restJso
1868
1868
  const deserializeAws_restJson1CreateApiMappingCommandError = async (output, context) => {
1869
1869
  const parsedOutput = {
1870
1870
  ...output,
1871
- body: await parseBody(output.body, context),
1871
+ body: await parseErrorBody(output.body, context),
1872
1872
  };
1873
1873
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1874
1874
  switch (errorCode) {
@@ -1941,7 +1941,7 @@ exports.deserializeAws_restJson1CreateAuthorizerCommand = deserializeAws_restJso
1941
1941
  const deserializeAws_restJson1CreateAuthorizerCommandError = async (output, context) => {
1942
1942
  const parsedOutput = {
1943
1943
  ...output,
1944
- body: await parseBody(output.body, context),
1944
+ body: await parseErrorBody(output.body, context),
1945
1945
  };
1946
1946
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1947
1947
  switch (errorCode) {
@@ -1999,7 +1999,7 @@ exports.deserializeAws_restJson1CreateDeploymentCommand = deserializeAws_restJso
1999
1999
  const deserializeAws_restJson1CreateDeploymentCommandError = async (output, context) => {
2000
2000
  const parsedOutput = {
2001
2001
  ...output,
2002
- body: await parseBody(output.body, context),
2002
+ body: await parseErrorBody(output.body, context),
2003
2003
  };
2004
2004
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2005
2005
  switch (errorCode) {
@@ -2054,7 +2054,7 @@ exports.deserializeAws_restJson1CreateDomainNameCommand = deserializeAws_restJso
2054
2054
  const deserializeAws_restJson1CreateDomainNameCommandError = async (output, context) => {
2055
2055
  const parsedOutput = {
2056
2056
  ...output,
2057
- body: await parseBody(output.body, context),
2057
+ body: await parseErrorBody(output.body, context),
2058
2058
  };
2059
2059
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2060
2060
  switch (errorCode) {
@@ -2157,7 +2157,7 @@ exports.deserializeAws_restJson1CreateIntegrationCommand = deserializeAws_restJs
2157
2157
  const deserializeAws_restJson1CreateIntegrationCommandError = async (output, context) => {
2158
2158
  const parsedOutput = {
2159
2159
  ...output,
2160
- body: await parseBody(output.body, context),
2160
+ body: await parseErrorBody(output.body, context),
2161
2161
  };
2162
2162
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2163
2163
  switch (errorCode) {
@@ -2215,7 +2215,7 @@ exports.deserializeAws_restJson1CreateIntegrationResponseCommand = deserializeAw
2215
2215
  const deserializeAws_restJson1CreateIntegrationResponseCommandError = async (output, context) => {
2216
2216
  const parsedOutput = {
2217
2217
  ...output,
2218
- body: await parseBody(output.body, context),
2218
+ body: await parseErrorBody(output.body, context),
2219
2219
  };
2220
2220
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2221
2221
  switch (errorCode) {
@@ -2270,7 +2270,7 @@ exports.deserializeAws_restJson1CreateModelCommand = deserializeAws_restJson1Cre
2270
2270
  const deserializeAws_restJson1CreateModelCommandError = async (output, context) => {
2271
2271
  const parsedOutput = {
2272
2272
  ...output,
2273
- body: await parseBody(output.body, context),
2273
+ body: await parseErrorBody(output.body, context),
2274
2274
  };
2275
2275
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2276
2276
  switch (errorCode) {
@@ -2349,7 +2349,7 @@ exports.deserializeAws_restJson1CreateRouteCommand = deserializeAws_restJson1Cre
2349
2349
  const deserializeAws_restJson1CreateRouteCommandError = async (output, context) => {
2350
2350
  const parsedOutput = {
2351
2351
  ...output,
2352
- body: await parseBody(output.body, context),
2352
+ body: await parseErrorBody(output.body, context),
2353
2353
  };
2354
2354
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2355
2355
  switch (errorCode) {
@@ -2404,7 +2404,7 @@ exports.deserializeAws_restJson1CreateRouteResponseCommand = deserializeAws_rest
2404
2404
  const deserializeAws_restJson1CreateRouteResponseCommandError = async (output, context) => {
2405
2405
  const parsedOutput = {
2406
2406
  ...output,
2407
- body: await parseBody(output.body, context),
2407
+ body: await parseErrorBody(output.body, context),
2408
2408
  };
2409
2409
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2410
2410
  switch (errorCode) {
@@ -2486,7 +2486,7 @@ exports.deserializeAws_restJson1CreateStageCommand = deserializeAws_restJson1Cre
2486
2486
  const deserializeAws_restJson1CreateStageCommandError = async (output, context) => {
2487
2487
  const parsedOutput = {
2488
2488
  ...output,
2489
- body: await parseBody(output.body, context),
2489
+ body: await parseErrorBody(output.body, context),
2490
2490
  };
2491
2491
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2492
2492
  switch (errorCode) {
@@ -2553,7 +2553,7 @@ exports.deserializeAws_restJson1CreateVpcLinkCommand = deserializeAws_restJson1C
2553
2553
  const deserializeAws_restJson1CreateVpcLinkCommandError = async (output, context) => {
2554
2554
  const parsedOutput = {
2555
2555
  ...output,
2556
- body: await parseBody(output.body, context),
2556
+ body: await parseErrorBody(output.body, context),
2557
2557
  };
2558
2558
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2559
2559
  switch (errorCode) {
@@ -2587,7 +2587,7 @@ exports.deserializeAws_restJson1DeleteAccessLogSettingsCommand = deserializeAws_
2587
2587
  const deserializeAws_restJson1DeleteAccessLogSettingsCommandError = async (output, context) => {
2588
2588
  const parsedOutput = {
2589
2589
  ...output,
2590
- body: await parseBody(output.body, context),
2590
+ body: await parseErrorBody(output.body, context),
2591
2591
  };
2592
2592
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2593
2593
  switch (errorCode) {
@@ -2621,7 +2621,7 @@ exports.deserializeAws_restJson1DeleteApiCommand = deserializeAws_restJson1Delet
2621
2621
  const deserializeAws_restJson1DeleteApiCommandError = async (output, context) => {
2622
2622
  const parsedOutput = {
2623
2623
  ...output,
2624
- body: await parseBody(output.body, context),
2624
+ body: await parseErrorBody(output.body, context),
2625
2625
  };
2626
2626
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2627
2627
  switch (errorCode) {
@@ -2655,7 +2655,7 @@ exports.deserializeAws_restJson1DeleteApiMappingCommand = deserializeAws_restJso
2655
2655
  const deserializeAws_restJson1DeleteApiMappingCommandError = async (output, context) => {
2656
2656
  const parsedOutput = {
2657
2657
  ...output,
2658
- body: await parseBody(output.body, context),
2658
+ body: await parseErrorBody(output.body, context),
2659
2659
  };
2660
2660
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2661
2661
  switch (errorCode) {
@@ -2692,7 +2692,7 @@ exports.deserializeAws_restJson1DeleteAuthorizerCommand = deserializeAws_restJso
2692
2692
  const deserializeAws_restJson1DeleteAuthorizerCommandError = async (output, context) => {
2693
2693
  const parsedOutput = {
2694
2694
  ...output,
2695
- body: await parseBody(output.body, context),
2695
+ body: await parseErrorBody(output.body, context),
2696
2696
  };
2697
2697
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2698
2698
  switch (errorCode) {
@@ -2726,7 +2726,7 @@ exports.deserializeAws_restJson1DeleteCorsConfigurationCommand = deserializeAws_
2726
2726
  const deserializeAws_restJson1DeleteCorsConfigurationCommandError = async (output, context) => {
2727
2727
  const parsedOutput = {
2728
2728
  ...output,
2729
- body: await parseBody(output.body, context),
2729
+ body: await parseErrorBody(output.body, context),
2730
2730
  };
2731
2731
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2732
2732
  switch (errorCode) {
@@ -2760,7 +2760,7 @@ exports.deserializeAws_restJson1DeleteDeploymentCommand = deserializeAws_restJso
2760
2760
  const deserializeAws_restJson1DeleteDeploymentCommandError = async (output, context) => {
2761
2761
  const parsedOutput = {
2762
2762
  ...output,
2763
- body: await parseBody(output.body, context),
2763
+ body: await parseErrorBody(output.body, context),
2764
2764
  };
2765
2765
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2766
2766
  switch (errorCode) {
@@ -2794,7 +2794,7 @@ exports.deserializeAws_restJson1DeleteDomainNameCommand = deserializeAws_restJso
2794
2794
  const deserializeAws_restJson1DeleteDomainNameCommandError = async (output, context) => {
2795
2795
  const parsedOutput = {
2796
2796
  ...output,
2797
- body: await parseBody(output.body, context),
2797
+ body: await parseErrorBody(output.body, context),
2798
2798
  };
2799
2799
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2800
2800
  switch (errorCode) {
@@ -2828,7 +2828,7 @@ exports.deserializeAws_restJson1DeleteIntegrationCommand = deserializeAws_restJs
2828
2828
  const deserializeAws_restJson1DeleteIntegrationCommandError = async (output, context) => {
2829
2829
  const parsedOutput = {
2830
2830
  ...output,
2831
- body: await parseBody(output.body, context),
2831
+ body: await parseErrorBody(output.body, context),
2832
2832
  };
2833
2833
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2834
2834
  switch (errorCode) {
@@ -2862,7 +2862,7 @@ exports.deserializeAws_restJson1DeleteIntegrationResponseCommand = deserializeAw
2862
2862
  const deserializeAws_restJson1DeleteIntegrationResponseCommandError = async (output, context) => {
2863
2863
  const parsedOutput = {
2864
2864
  ...output,
2865
- body: await parseBody(output.body, context),
2865
+ body: await parseErrorBody(output.body, context),
2866
2866
  };
2867
2867
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2868
2868
  switch (errorCode) {
@@ -2896,7 +2896,7 @@ exports.deserializeAws_restJson1DeleteModelCommand = deserializeAws_restJson1Del
2896
2896
  const deserializeAws_restJson1DeleteModelCommandError = async (output, context) => {
2897
2897
  const parsedOutput = {
2898
2898
  ...output,
2899
- body: await parseBody(output.body, context),
2899
+ body: await parseErrorBody(output.body, context),
2900
2900
  };
2901
2901
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2902
2902
  switch (errorCode) {
@@ -2930,7 +2930,7 @@ exports.deserializeAws_restJson1DeleteRouteCommand = deserializeAws_restJson1Del
2930
2930
  const deserializeAws_restJson1DeleteRouteCommandError = async (output, context) => {
2931
2931
  const parsedOutput = {
2932
2932
  ...output,
2933
- body: await parseBody(output.body, context),
2933
+ body: await parseErrorBody(output.body, context),
2934
2934
  };
2935
2935
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2936
2936
  switch (errorCode) {
@@ -2964,7 +2964,7 @@ exports.deserializeAws_restJson1DeleteRouteRequestParameterCommand = deserialize
2964
2964
  const deserializeAws_restJson1DeleteRouteRequestParameterCommandError = async (output, context) => {
2965
2965
  const parsedOutput = {
2966
2966
  ...output,
2967
- body: await parseBody(output.body, context),
2967
+ body: await parseErrorBody(output.body, context),
2968
2968
  };
2969
2969
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2970
2970
  switch (errorCode) {
@@ -2998,7 +2998,7 @@ exports.deserializeAws_restJson1DeleteRouteResponseCommand = deserializeAws_rest
2998
2998
  const deserializeAws_restJson1DeleteRouteResponseCommandError = async (output, context) => {
2999
2999
  const parsedOutput = {
3000
3000
  ...output,
3001
- body: await parseBody(output.body, context),
3001
+ body: await parseErrorBody(output.body, context),
3002
3002
  };
3003
3003
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3004
3004
  switch (errorCode) {
@@ -3032,7 +3032,7 @@ exports.deserializeAws_restJson1DeleteRouteSettingsCommand = deserializeAws_rest
3032
3032
  const deserializeAws_restJson1DeleteRouteSettingsCommandError = async (output, context) => {
3033
3033
  const parsedOutput = {
3034
3034
  ...output,
3035
- body: await parseBody(output.body, context),
3035
+ body: await parseErrorBody(output.body, context),
3036
3036
  };
3037
3037
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3038
3038
  switch (errorCode) {
@@ -3066,7 +3066,7 @@ exports.deserializeAws_restJson1DeleteStageCommand = deserializeAws_restJson1Del
3066
3066
  const deserializeAws_restJson1DeleteStageCommandError = async (output, context) => {
3067
3067
  const parsedOutput = {
3068
3068
  ...output,
3069
- body: await parseBody(output.body, context),
3069
+ body: await parseErrorBody(output.body, context),
3070
3070
  };
3071
3071
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3072
3072
  switch (errorCode) {
@@ -3100,7 +3100,7 @@ exports.deserializeAws_restJson1DeleteVpcLinkCommand = deserializeAws_restJson1D
3100
3100
  const deserializeAws_restJson1DeleteVpcLinkCommandError = async (output, context) => {
3101
3101
  const parsedOutput = {
3102
3102
  ...output,
3103
- body: await parseBody(output.body, context),
3103
+ body: await parseErrorBody(output.body, context),
3104
3104
  };
3105
3105
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3106
3106
  switch (errorCode) {
@@ -3135,7 +3135,7 @@ exports.deserializeAws_restJson1ExportApiCommand = deserializeAws_restJson1Expor
3135
3135
  const deserializeAws_restJson1ExportApiCommandError = async (output, context) => {
3136
3136
  const parsedOutput = {
3137
3137
  ...output,
3138
- body: await parseBody(output.body, context),
3138
+ body: await parseErrorBody(output.body, context),
3139
3139
  };
3140
3140
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3141
3141
  switch (errorCode) {
@@ -3220,7 +3220,7 @@ exports.deserializeAws_restJson1GetApiCommand = deserializeAws_restJson1GetApiCo
3220
3220
  const deserializeAws_restJson1GetApiCommandError = async (output, context) => {
3221
3221
  const parsedOutput = {
3222
3222
  ...output,
3223
- body: await parseBody(output.body, context),
3223
+ body: await parseErrorBody(output.body, context),
3224
3224
  };
3225
3225
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3226
3226
  switch (errorCode) {
@@ -3266,7 +3266,7 @@ exports.deserializeAws_restJson1GetApiMappingCommand = deserializeAws_restJson1G
3266
3266
  const deserializeAws_restJson1GetApiMappingCommandError = async (output, context) => {
3267
3267
  const parsedOutput = {
3268
3268
  ...output,
3269
- body: await parseBody(output.body, context),
3269
+ body: await parseErrorBody(output.body, context),
3270
3270
  };
3271
3271
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3272
3272
  switch (errorCode) {
@@ -3309,7 +3309,7 @@ exports.deserializeAws_restJson1GetApiMappingsCommand = deserializeAws_restJson1
3309
3309
  const deserializeAws_restJson1GetApiMappingsCommandError = async (output, context) => {
3310
3310
  const parsedOutput = {
3311
3311
  ...output,
3312
- body: await parseBody(output.body, context),
3312
+ body: await parseErrorBody(output.body, context),
3313
3313
  };
3314
3314
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3315
3315
  switch (errorCode) {
@@ -3352,7 +3352,7 @@ exports.deserializeAws_restJson1GetApisCommand = deserializeAws_restJson1GetApis
3352
3352
  const deserializeAws_restJson1GetApisCommandError = async (output, context) => {
3353
3353
  const parsedOutput = {
3354
3354
  ...output,
3355
- body: await parseBody(output.body, context),
3355
+ body: await parseErrorBody(output.body, context),
3356
3356
  };
3357
3357
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3358
3358
  switch (errorCode) {
@@ -3422,7 +3422,7 @@ exports.deserializeAws_restJson1GetAuthorizerCommand = deserializeAws_restJson1G
3422
3422
  const deserializeAws_restJson1GetAuthorizerCommandError = async (output, context) => {
3423
3423
  const parsedOutput = {
3424
3424
  ...output,
3425
- body: await parseBody(output.body, context),
3425
+ body: await parseErrorBody(output.body, context),
3426
3426
  };
3427
3427
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3428
3428
  switch (errorCode) {
@@ -3462,7 +3462,7 @@ exports.deserializeAws_restJson1GetAuthorizersCommand = deserializeAws_restJson1
3462
3462
  const deserializeAws_restJson1GetAuthorizersCommandError = async (output, context) => {
3463
3463
  const parsedOutput = {
3464
3464
  ...output,
3465
- body: await parseBody(output.body, context),
3465
+ body: await parseErrorBody(output.body, context),
3466
3466
  };
3467
3467
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3468
3468
  switch (errorCode) {
@@ -3517,7 +3517,7 @@ exports.deserializeAws_restJson1GetDeploymentCommand = deserializeAws_restJson1G
3517
3517
  const deserializeAws_restJson1GetDeploymentCommandError = async (output, context) => {
3518
3518
  const parsedOutput = {
3519
3519
  ...output,
3520
- body: await parseBody(output.body, context),
3520
+ body: await parseErrorBody(output.body, context),
3521
3521
  };
3522
3522
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3523
3523
  switch (errorCode) {
@@ -3557,7 +3557,7 @@ exports.deserializeAws_restJson1GetDeploymentsCommand = deserializeAws_restJson1
3557
3557
  const deserializeAws_restJson1GetDeploymentsCommandError = async (output, context) => {
3558
3558
  const parsedOutput = {
3559
3559
  ...output,
3560
- body: await parseBody(output.body, context),
3560
+ body: await parseErrorBody(output.body, context),
3561
3561
  };
3562
3562
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3563
3563
  switch (errorCode) {
@@ -3609,7 +3609,7 @@ exports.deserializeAws_restJson1GetDomainNameCommand = deserializeAws_restJson1G
3609
3609
  const deserializeAws_restJson1GetDomainNameCommandError = async (output, context) => {
3610
3610
  const parsedOutput = {
3611
3611
  ...output,
3612
- body: await parseBody(output.body, context),
3612
+ body: await parseErrorBody(output.body, context),
3613
3613
  };
3614
3614
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3615
3615
  switch (errorCode) {
@@ -3649,7 +3649,7 @@ exports.deserializeAws_restJson1GetDomainNamesCommand = deserializeAws_restJson1
3649
3649
  const deserializeAws_restJson1GetDomainNamesCommandError = async (output, context) => {
3650
3650
  const parsedOutput = {
3651
3651
  ...output,
3652
- body: await parseBody(output.body, context),
3652
+ body: await parseErrorBody(output.body, context),
3653
3653
  };
3654
3654
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3655
3655
  switch (errorCode) {
@@ -3746,7 +3746,7 @@ exports.deserializeAws_restJson1GetIntegrationCommand = deserializeAws_restJson1
3746
3746
  const deserializeAws_restJson1GetIntegrationCommandError = async (output, context) => {
3747
3747
  const parsedOutput = {
3748
3748
  ...output,
3749
- body: await parseBody(output.body, context),
3749
+ body: await parseErrorBody(output.body, context),
3750
3750
  };
3751
3751
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3752
3752
  switch (errorCode) {
@@ -3798,7 +3798,7 @@ exports.deserializeAws_restJson1GetIntegrationResponseCommand = deserializeAws_r
3798
3798
  const deserializeAws_restJson1GetIntegrationResponseCommandError = async (output, context) => {
3799
3799
  const parsedOutput = {
3800
3800
  ...output,
3801
- body: await parseBody(output.body, context),
3801
+ body: await parseErrorBody(output.body, context),
3802
3802
  };
3803
3803
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3804
3804
  switch (errorCode) {
@@ -3838,7 +3838,7 @@ exports.deserializeAws_restJson1GetIntegrationResponsesCommand = deserializeAws_
3838
3838
  const deserializeAws_restJson1GetIntegrationResponsesCommandError = async (output, context) => {
3839
3839
  const parsedOutput = {
3840
3840
  ...output,
3841
- body: await parseBody(output.body, context),
3841
+ body: await parseErrorBody(output.body, context),
3842
3842
  };
3843
3843
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3844
3844
  switch (errorCode) {
@@ -3881,7 +3881,7 @@ exports.deserializeAws_restJson1GetIntegrationsCommand = deserializeAws_restJson
3881
3881
  const deserializeAws_restJson1GetIntegrationsCommandError = async (output, context) => {
3882
3882
  const parsedOutput = {
3883
3883
  ...output,
3884
- body: await parseBody(output.body, context),
3884
+ body: await parseErrorBody(output.body, context),
3885
3885
  };
3886
3886
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3887
3887
  switch (errorCode) {
@@ -3933,7 +3933,7 @@ exports.deserializeAws_restJson1GetModelCommand = deserializeAws_restJson1GetMod
3933
3933
  const deserializeAws_restJson1GetModelCommandError = async (output, context) => {
3934
3934
  const parsedOutput = {
3935
3935
  ...output,
3936
- body: await parseBody(output.body, context),
3936
+ body: await parseErrorBody(output.body, context),
3937
3937
  };
3938
3938
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3939
3939
  switch (errorCode) {
@@ -3973,7 +3973,7 @@ exports.deserializeAws_restJson1GetModelsCommand = deserializeAws_restJson1GetMo
3973
3973
  const deserializeAws_restJson1GetModelsCommandError = async (output, context) => {
3974
3974
  const parsedOutput = {
3975
3975
  ...output,
3976
- body: await parseBody(output.body, context),
3976
+ body: await parseErrorBody(output.body, context),
3977
3977
  };
3978
3978
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3979
3979
  switch (errorCode) {
@@ -4013,7 +4013,7 @@ exports.deserializeAws_restJson1GetModelTemplateCommand = deserializeAws_restJso
4013
4013
  const deserializeAws_restJson1GetModelTemplateCommandError = async (output, context) => {
4014
4014
  const parsedOutput = {
4015
4015
  ...output,
4016
- body: await parseBody(output.body, context),
4016
+ body: await parseErrorBody(output.body, context),
4017
4017
  };
4018
4018
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4019
4019
  switch (errorCode) {
@@ -4086,7 +4086,7 @@ exports.deserializeAws_restJson1GetRouteCommand = deserializeAws_restJson1GetRou
4086
4086
  const deserializeAws_restJson1GetRouteCommandError = async (output, context) => {
4087
4087
  const parsedOutput = {
4088
4088
  ...output,
4089
- body: await parseBody(output.body, context),
4089
+ body: await parseErrorBody(output.body, context),
4090
4090
  };
4091
4091
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4092
4092
  switch (errorCode) {
@@ -4135,7 +4135,7 @@ exports.deserializeAws_restJson1GetRouteResponseCommand = deserializeAws_restJso
4135
4135
  const deserializeAws_restJson1GetRouteResponseCommandError = async (output, context) => {
4136
4136
  const parsedOutput = {
4137
4137
  ...output,
4138
- body: await parseBody(output.body, context),
4138
+ body: await parseErrorBody(output.body, context),
4139
4139
  };
4140
4140
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4141
4141
  switch (errorCode) {
@@ -4175,7 +4175,7 @@ exports.deserializeAws_restJson1GetRouteResponsesCommand = deserializeAws_restJs
4175
4175
  const deserializeAws_restJson1GetRouteResponsesCommandError = async (output, context) => {
4176
4176
  const parsedOutput = {
4177
4177
  ...output,
4178
- body: await parseBody(output.body, context),
4178
+ body: await parseErrorBody(output.body, context),
4179
4179
  };
4180
4180
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4181
4181
  switch (errorCode) {
@@ -4218,7 +4218,7 @@ exports.deserializeAws_restJson1GetRoutesCommand = deserializeAws_restJson1GetRo
4218
4218
  const deserializeAws_restJson1GetRoutesCommandError = async (output, context) => {
4219
4219
  const parsedOutput = {
4220
4220
  ...output,
4221
- body: await parseBody(output.body, context),
4221
+ body: await parseErrorBody(output.body, context),
4222
4222
  };
4223
4223
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4224
4224
  switch (errorCode) {
@@ -4297,7 +4297,7 @@ exports.deserializeAws_restJson1GetStageCommand = deserializeAws_restJson1GetSta
4297
4297
  const deserializeAws_restJson1GetStageCommandError = async (output, context) => {
4298
4298
  const parsedOutput = {
4299
4299
  ...output,
4300
- body: await parseBody(output.body, context),
4300
+ body: await parseErrorBody(output.body, context),
4301
4301
  };
4302
4302
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4303
4303
  switch (errorCode) {
@@ -4337,7 +4337,7 @@ exports.deserializeAws_restJson1GetStagesCommand = deserializeAws_restJson1GetSt
4337
4337
  const deserializeAws_restJson1GetStagesCommandError = async (output, context) => {
4338
4338
  const parsedOutput = {
4339
4339
  ...output,
4340
- body: await parseBody(output.body, context),
4340
+ body: await parseErrorBody(output.body, context),
4341
4341
  };
4342
4342
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4343
4343
  switch (errorCode) {
@@ -4377,7 +4377,7 @@ exports.deserializeAws_restJson1GetTagsCommand = deserializeAws_restJson1GetTags
4377
4377
  const deserializeAws_restJson1GetTagsCommandError = async (output, context) => {
4378
4378
  const parsedOutput = {
4379
4379
  ...output,
4380
- body: await parseBody(output.body, context),
4380
+ body: await parseErrorBody(output.body, context),
4381
4381
  };
4382
4382
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4383
4383
  switch (errorCode) {
@@ -4444,7 +4444,7 @@ exports.deserializeAws_restJson1GetVpcLinkCommand = deserializeAws_restJson1GetV
4444
4444
  const deserializeAws_restJson1GetVpcLinkCommandError = async (output, context) => {
4445
4445
  const parsedOutput = {
4446
4446
  ...output,
4447
- body: await parseBody(output.body, context),
4447
+ body: await parseErrorBody(output.body, context),
4448
4448
  };
4449
4449
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4450
4450
  switch (errorCode) {
@@ -4484,7 +4484,7 @@ exports.deserializeAws_restJson1GetVpcLinksCommand = deserializeAws_restJson1Get
4484
4484
  const deserializeAws_restJson1GetVpcLinksCommandError = async (output, context) => {
4485
4485
  const parsedOutput = {
4486
4486
  ...output,
4487
- body: await parseBody(output.body, context),
4487
+ body: await parseErrorBody(output.body, context),
4488
4488
  };
4489
4489
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4490
4490
  switch (errorCode) {
@@ -4566,7 +4566,7 @@ exports.deserializeAws_restJson1ImportApiCommand = deserializeAws_restJson1Impor
4566
4566
  const deserializeAws_restJson1ImportApiCommandError = async (output, context) => {
4567
4567
  const parsedOutput = {
4568
4568
  ...output,
4569
- body: await parseBody(output.body, context),
4569
+ body: await parseErrorBody(output.body, context),
4570
4570
  };
4571
4571
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4572
4572
  switch (errorCode) {
@@ -4654,7 +4654,7 @@ exports.deserializeAws_restJson1ReimportApiCommand = deserializeAws_restJson1Rei
4654
4654
  const deserializeAws_restJson1ReimportApiCommandError = async (output, context) => {
4655
4655
  const parsedOutput = {
4656
4656
  ...output,
4657
- body: await parseBody(output.body, context),
4657
+ body: await parseErrorBody(output.body, context),
4658
4658
  };
4659
4659
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4660
4660
  switch (errorCode) {
@@ -4694,7 +4694,7 @@ exports.deserializeAws_restJson1ResetAuthorizersCacheCommand = deserializeAws_re
4694
4694
  const deserializeAws_restJson1ResetAuthorizersCacheCommandError = async (output, context) => {
4695
4695
  const parsedOutput = {
4696
4696
  ...output,
4697
- body: await parseBody(output.body, context),
4697
+ body: await parseErrorBody(output.body, context),
4698
4698
  };
4699
4699
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4700
4700
  switch (errorCode) {
@@ -4728,7 +4728,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
4728
4728
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
4729
4729
  const parsedOutput = {
4730
4730
  ...output,
4731
- body: await parseBody(output.body, context),
4731
+ body: await parseErrorBody(output.body, context),
4732
4732
  };
4733
4733
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4734
4734
  switch (errorCode) {
@@ -4768,7 +4768,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
4768
4768
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
4769
4769
  const parsedOutput = {
4770
4770
  ...output,
4771
- body: await parseBody(output.body, context),
4771
+ body: await parseErrorBody(output.body, context),
4772
4772
  };
4773
4773
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4774
4774
  switch (errorCode) {
@@ -4856,7 +4856,7 @@ exports.deserializeAws_restJson1UpdateApiCommand = deserializeAws_restJson1Updat
4856
4856
  const deserializeAws_restJson1UpdateApiCommandError = async (output, context) => {
4857
4857
  const parsedOutput = {
4858
4858
  ...output,
4859
- body: await parseBody(output.body, context),
4859
+ body: await parseErrorBody(output.body, context),
4860
4860
  };
4861
4861
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4862
4862
  switch (errorCode) {
@@ -4908,7 +4908,7 @@ exports.deserializeAws_restJson1UpdateApiMappingCommand = deserializeAws_restJso
4908
4908
  const deserializeAws_restJson1UpdateApiMappingCommandError = async (output, context) => {
4909
4909
  const parsedOutput = {
4910
4910
  ...output,
4911
- body: await parseBody(output.body, context),
4911
+ body: await parseErrorBody(output.body, context),
4912
4912
  };
4913
4913
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4914
4914
  switch (errorCode) {
@@ -4981,7 +4981,7 @@ exports.deserializeAws_restJson1UpdateAuthorizerCommand = deserializeAws_restJso
4981
4981
  const deserializeAws_restJson1UpdateAuthorizerCommandError = async (output, context) => {
4982
4982
  const parsedOutput = {
4983
4983
  ...output,
4984
- body: await parseBody(output.body, context),
4984
+ body: await parseErrorBody(output.body, context),
4985
4985
  };
4986
4986
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4987
4987
  switch (errorCode) {
@@ -5039,7 +5039,7 @@ exports.deserializeAws_restJson1UpdateDeploymentCommand = deserializeAws_restJso
5039
5039
  const deserializeAws_restJson1UpdateDeploymentCommandError = async (output, context) => {
5040
5040
  const parsedOutput = {
5041
5041
  ...output,
5042
- body: await parseBody(output.body, context),
5042
+ body: await parseErrorBody(output.body, context),
5043
5043
  };
5044
5044
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5045
5045
  switch (errorCode) {
@@ -5094,7 +5094,7 @@ exports.deserializeAws_restJson1UpdateDomainNameCommand = deserializeAws_restJso
5094
5094
  const deserializeAws_restJson1UpdateDomainNameCommandError = async (output, context) => {
5095
5095
  const parsedOutput = {
5096
5096
  ...output,
5097
- body: await parseBody(output.body, context),
5097
+ body: await parseErrorBody(output.body, context),
5098
5098
  };
5099
5099
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5100
5100
  switch (errorCode) {
@@ -5194,7 +5194,7 @@ exports.deserializeAws_restJson1UpdateIntegrationCommand = deserializeAws_restJs
5194
5194
  const deserializeAws_restJson1UpdateIntegrationCommandError = async (output, context) => {
5195
5195
  const parsedOutput = {
5196
5196
  ...output,
5197
- body: await parseBody(output.body, context),
5197
+ body: await parseErrorBody(output.body, context),
5198
5198
  };
5199
5199
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5200
5200
  switch (errorCode) {
@@ -5252,7 +5252,7 @@ exports.deserializeAws_restJson1UpdateIntegrationResponseCommand = deserializeAw
5252
5252
  const deserializeAws_restJson1UpdateIntegrationResponseCommandError = async (output, context) => {
5253
5253
  const parsedOutput = {
5254
5254
  ...output,
5255
- body: await parseBody(output.body, context),
5255
+ body: await parseErrorBody(output.body, context),
5256
5256
  };
5257
5257
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5258
5258
  switch (errorCode) {
@@ -5307,7 +5307,7 @@ exports.deserializeAws_restJson1UpdateModelCommand = deserializeAws_restJson1Upd
5307
5307
  const deserializeAws_restJson1UpdateModelCommandError = async (output, context) => {
5308
5308
  const parsedOutput = {
5309
5309
  ...output,
5310
- body: await parseBody(output.body, context),
5310
+ body: await parseErrorBody(output.body, context),
5311
5311
  };
5312
5312
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5313
5313
  switch (errorCode) {
@@ -5386,7 +5386,7 @@ exports.deserializeAws_restJson1UpdateRouteCommand = deserializeAws_restJson1Upd
5386
5386
  const deserializeAws_restJson1UpdateRouteCommandError = async (output, context) => {
5387
5387
  const parsedOutput = {
5388
5388
  ...output,
5389
- body: await parseBody(output.body, context),
5389
+ body: await parseErrorBody(output.body, context),
5390
5390
  };
5391
5391
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5392
5392
  switch (errorCode) {
@@ -5441,7 +5441,7 @@ exports.deserializeAws_restJson1UpdateRouteResponseCommand = deserializeAws_rest
5441
5441
  const deserializeAws_restJson1UpdateRouteResponseCommandError = async (output, context) => {
5442
5442
  const parsedOutput = {
5443
5443
  ...output,
5444
- body: await parseBody(output.body, context),
5444
+ body: await parseErrorBody(output.body, context),
5445
5445
  };
5446
5446
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5447
5447
  switch (errorCode) {
@@ -5523,7 +5523,7 @@ exports.deserializeAws_restJson1UpdateStageCommand = deserializeAws_restJson1Upd
5523
5523
  const deserializeAws_restJson1UpdateStageCommandError = async (output, context) => {
5524
5524
  const parsedOutput = {
5525
5525
  ...output,
5526
- body: await parseBody(output.body, context),
5526
+ body: await parseErrorBody(output.body, context),
5527
5527
  };
5528
5528
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5529
5529
  switch (errorCode) {
@@ -5590,7 +5590,7 @@ exports.deserializeAws_restJson1UpdateVpcLinkCommand = deserializeAws_restJson1U
5590
5590
  const deserializeAws_restJson1UpdateVpcLinkCommandError = async (output, context) => {
5591
5591
  const parsedOutput = {
5592
5592
  ...output,
5593
- body: await parseBody(output.body, context),
5593
+ body: await parseErrorBody(output.body, context),
5594
5594
  };
5595
5595
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5596
5596
  switch (errorCode) {
@@ -6512,6 +6512,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
6512
6512
  }
6513
6513
  return {};
6514
6514
  });
6515
+ const parseErrorBody = async (errorBody, context) => {
6516
+ var _a;
6517
+ const value = await parseBody(errorBody, context);
6518
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
6519
+ return value;
6520
+ };
6515
6521
  const loadRestJsonErrorCode = (output, data) => {
6516
6522
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
6517
6523
  const sanitizeErrorCode = (rawValue) => {
@@ -1992,7 +1992,7 @@ var deserializeAws_restJson1CreateApiCommandError = function (output, context) {
1992
1992
  case 0:
1993
1993
  _a = [__assign({}, output)];
1994
1994
  _c = {};
1995
- return [4, parseBody(output.body, context)];
1995
+ return [4, parseErrorBody(output.body, context)];
1996
1996
  case 1:
1997
1997
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1998
1998
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2069,7 +2069,7 @@ var deserializeAws_restJson1CreateApiMappingCommandError = function (output, con
2069
2069
  case 0:
2070
2070
  _a = [__assign({}, output)];
2071
2071
  _c = {};
2072
- return [4, parseBody(output.body, context)];
2072
+ return [4, parseErrorBody(output.body, context)];
2073
2073
  case 1:
2074
2074
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2075
2075
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2167,7 +2167,7 @@ var deserializeAws_restJson1CreateAuthorizerCommandError = function (output, con
2167
2167
  case 0:
2168
2168
  _a = [__assign({}, output)];
2169
2169
  _c = {};
2170
- return [4, parseBody(output.body, context)];
2170
+ return [4, parseErrorBody(output.body, context)];
2171
2171
  case 1:
2172
2172
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2173
2173
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2250,7 +2250,7 @@ var deserializeAws_restJson1CreateDeploymentCommandError = function (output, con
2250
2250
  case 0:
2251
2251
  _a = [__assign({}, output)];
2252
2252
  _c = {};
2253
- return [4, parseBody(output.body, context)];
2253
+ return [4, parseErrorBody(output.body, context)];
2254
2254
  case 1:
2255
2255
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2256
2256
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2330,7 +2330,7 @@ var deserializeAws_restJson1CreateDomainNameCommandError = function (output, con
2330
2330
  case 0:
2331
2331
  _a = [__assign({}, output)];
2332
2332
  _c = {};
2333
- return [4, parseBody(output.body, context)];
2333
+ return [4, parseErrorBody(output.body, context)];
2334
2334
  case 1:
2335
2335
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2336
2336
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2459,7 +2459,7 @@ var deserializeAws_restJson1CreateIntegrationCommandError = function (output, co
2459
2459
  case 0:
2460
2460
  _a = [__assign({}, output)];
2461
2461
  _c = {};
2462
- return [4, parseBody(output.body, context)];
2462
+ return [4, parseErrorBody(output.body, context)];
2463
2463
  case 1:
2464
2464
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2465
2465
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2542,7 +2542,7 @@ var deserializeAws_restJson1CreateIntegrationResponseCommandError = function (ou
2542
2542
  case 0:
2543
2543
  _a = [__assign({}, output)];
2544
2544
  _c = {};
2545
- return [4, parseBody(output.body, context)];
2545
+ return [4, parseErrorBody(output.body, context)];
2546
2546
  case 1:
2547
2547
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2548
2548
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2622,7 +2622,7 @@ var deserializeAws_restJson1CreateModelCommandError = function (output, context)
2622
2622
  case 0:
2623
2623
  _a = [__assign({}, output)];
2624
2624
  _c = {};
2625
- return [4, parseBody(output.body, context)];
2625
+ return [4, parseErrorBody(output.body, context)];
2626
2626
  case 1:
2627
2627
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2628
2628
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2726,7 +2726,7 @@ var deserializeAws_restJson1CreateRouteCommandError = function (output, context)
2726
2726
  case 0:
2727
2727
  _a = [__assign({}, output)];
2728
2728
  _c = {};
2729
- return [4, parseBody(output.body, context)];
2729
+ return [4, parseErrorBody(output.body, context)];
2730
2730
  case 1:
2731
2731
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2732
2732
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2806,7 +2806,7 @@ var deserializeAws_restJson1CreateRouteResponseCommandError = function (output,
2806
2806
  case 0:
2807
2807
  _a = [__assign({}, output)];
2808
2808
  _c = {};
2809
- return [4, parseBody(output.body, context)];
2809
+ return [4, parseErrorBody(output.body, context)];
2810
2810
  case 1:
2811
2811
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2812
2812
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2913,7 +2913,7 @@ var deserializeAws_restJson1CreateStageCommandError = function (output, context)
2913
2913
  case 0:
2914
2914
  _a = [__assign({}, output)];
2915
2915
  _c = {};
2916
- return [4, parseBody(output.body, context)];
2916
+ return [4, parseErrorBody(output.body, context)];
2917
2917
  case 1:
2918
2918
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2919
2919
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3005,7 +3005,7 @@ var deserializeAws_restJson1CreateVpcLinkCommandError = function (output, contex
3005
3005
  case 0:
3006
3006
  _a = [__assign({}, output)];
3007
3007
  _c = {};
3008
- return [4, parseBody(output.body, context)];
3008
+ return [4, parseErrorBody(output.body, context)];
3009
3009
  case 1:
3010
3010
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3011
3011
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3060,7 +3060,7 @@ var deserializeAws_restJson1DeleteAccessLogSettingsCommandError = function (outp
3060
3060
  case 0:
3061
3061
  _a = [__assign({}, output)];
3062
3062
  _c = {};
3063
- return [4, parseBody(output.body, context)];
3063
+ return [4, parseErrorBody(output.body, context)];
3064
3064
  case 1:
3065
3065
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3066
3066
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3115,7 +3115,7 @@ var deserializeAws_restJson1DeleteApiCommandError = function (output, context) {
3115
3115
  case 0:
3116
3116
  _a = [__assign({}, output)];
3117
3117
  _c = {};
3118
- return [4, parseBody(output.body, context)];
3118
+ return [4, parseErrorBody(output.body, context)];
3119
3119
  case 1:
3120
3120
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3121
3121
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3170,7 +3170,7 @@ var deserializeAws_restJson1DeleteApiMappingCommandError = function (output, con
3170
3170
  case 0:
3171
3171
  _a = [__assign({}, output)];
3172
3172
  _c = {};
3173
- return [4, parseBody(output.body, context)];
3173
+ return [4, parseErrorBody(output.body, context)];
3174
3174
  case 1:
3175
3175
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3176
3176
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3229,7 +3229,7 @@ var deserializeAws_restJson1DeleteAuthorizerCommandError = function (output, con
3229
3229
  case 0:
3230
3230
  _a = [__assign({}, output)];
3231
3231
  _c = {};
3232
- return [4, parseBody(output.body, context)];
3232
+ return [4, parseErrorBody(output.body, context)];
3233
3233
  case 1:
3234
3234
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3235
3235
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3284,7 +3284,7 @@ var deserializeAws_restJson1DeleteCorsConfigurationCommandError = function (outp
3284
3284
  case 0:
3285
3285
  _a = [__assign({}, output)];
3286
3286
  _c = {};
3287
- return [4, parseBody(output.body, context)];
3287
+ return [4, parseErrorBody(output.body, context)];
3288
3288
  case 1:
3289
3289
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3290
3290
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3339,7 +3339,7 @@ var deserializeAws_restJson1DeleteDeploymentCommandError = function (output, con
3339
3339
  case 0:
3340
3340
  _a = [__assign({}, output)];
3341
3341
  _c = {};
3342
- return [4, parseBody(output.body, context)];
3342
+ return [4, parseErrorBody(output.body, context)];
3343
3343
  case 1:
3344
3344
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3345
3345
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3394,7 +3394,7 @@ var deserializeAws_restJson1DeleteDomainNameCommandError = function (output, con
3394
3394
  case 0:
3395
3395
  _a = [__assign({}, output)];
3396
3396
  _c = {};
3397
- return [4, parseBody(output.body, context)];
3397
+ return [4, parseErrorBody(output.body, context)];
3398
3398
  case 1:
3399
3399
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3400
3400
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3449,7 +3449,7 @@ var deserializeAws_restJson1DeleteIntegrationCommandError = function (output, co
3449
3449
  case 0:
3450
3450
  _a = [__assign({}, output)];
3451
3451
  _c = {};
3452
- return [4, parseBody(output.body, context)];
3452
+ return [4, parseErrorBody(output.body, context)];
3453
3453
  case 1:
3454
3454
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3455
3455
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3504,7 +3504,7 @@ var deserializeAws_restJson1DeleteIntegrationResponseCommandError = function (ou
3504
3504
  case 0:
3505
3505
  _a = [__assign({}, output)];
3506
3506
  _c = {};
3507
- return [4, parseBody(output.body, context)];
3507
+ return [4, parseErrorBody(output.body, context)];
3508
3508
  case 1:
3509
3509
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3510
3510
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3559,7 +3559,7 @@ var deserializeAws_restJson1DeleteModelCommandError = function (output, context)
3559
3559
  case 0:
3560
3560
  _a = [__assign({}, output)];
3561
3561
  _c = {};
3562
- return [4, parseBody(output.body, context)];
3562
+ return [4, parseErrorBody(output.body, context)];
3563
3563
  case 1:
3564
3564
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3565
3565
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3614,7 +3614,7 @@ var deserializeAws_restJson1DeleteRouteCommandError = function (output, context)
3614
3614
  case 0:
3615
3615
  _a = [__assign({}, output)];
3616
3616
  _c = {};
3617
- return [4, parseBody(output.body, context)];
3617
+ return [4, parseErrorBody(output.body, context)];
3618
3618
  case 1:
3619
3619
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3620
3620
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3669,7 +3669,7 @@ var deserializeAws_restJson1DeleteRouteRequestParameterCommandError = function (
3669
3669
  case 0:
3670
3670
  _a = [__assign({}, output)];
3671
3671
  _c = {};
3672
- return [4, parseBody(output.body, context)];
3672
+ return [4, parseErrorBody(output.body, context)];
3673
3673
  case 1:
3674
3674
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3675
3675
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3724,7 +3724,7 @@ var deserializeAws_restJson1DeleteRouteResponseCommandError = function (output,
3724
3724
  case 0:
3725
3725
  _a = [__assign({}, output)];
3726
3726
  _c = {};
3727
- return [4, parseBody(output.body, context)];
3727
+ return [4, parseErrorBody(output.body, context)];
3728
3728
  case 1:
3729
3729
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3730
3730
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3779,7 +3779,7 @@ var deserializeAws_restJson1DeleteRouteSettingsCommandError = function (output,
3779
3779
  case 0:
3780
3780
  _a = [__assign({}, output)];
3781
3781
  _c = {};
3782
- return [4, parseBody(output.body, context)];
3782
+ return [4, parseErrorBody(output.body, context)];
3783
3783
  case 1:
3784
3784
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3785
3785
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3834,7 +3834,7 @@ var deserializeAws_restJson1DeleteStageCommandError = function (output, context)
3834
3834
  case 0:
3835
3835
  _a = [__assign({}, output)];
3836
3836
  _c = {};
3837
- return [4, parseBody(output.body, context)];
3837
+ return [4, parseErrorBody(output.body, context)];
3838
3838
  case 1:
3839
3839
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3840
3840
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3889,7 +3889,7 @@ var deserializeAws_restJson1DeleteVpcLinkCommandError = function (output, contex
3889
3889
  case 0:
3890
3890
  _a = [__assign({}, output)];
3891
3891
  _c = {};
3892
- return [4, parseBody(output.body, context)];
3892
+ return [4, parseErrorBody(output.body, context)];
3893
3893
  case 1:
3894
3894
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3895
3895
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3945,7 +3945,7 @@ var deserializeAws_restJson1ExportApiCommandError = function (output, context) {
3945
3945
  case 0:
3946
3946
  _a = [__assign({}, output)];
3947
3947
  _c = {};
3948
- return [4, parseBody(output.body, context)];
3948
+ return [4, parseErrorBody(output.body, context)];
3949
3949
  case 1:
3950
3950
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3951
3951
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4054,7 +4054,7 @@ var deserializeAws_restJson1GetApiCommandError = function (output, context) { re
4054
4054
  case 0:
4055
4055
  _a = [__assign({}, output)];
4056
4056
  _c = {};
4057
- return [4, parseBody(output.body, context)];
4057
+ return [4, parseErrorBody(output.body, context)];
4058
4058
  case 1:
4059
4059
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4060
4060
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4123,7 +4123,7 @@ var deserializeAws_restJson1GetApiMappingCommandError = function (output, contex
4123
4123
  case 0:
4124
4124
  _a = [__assign({}, output)];
4125
4125
  _c = {};
4126
- return [4, parseBody(output.body, context)];
4126
+ return [4, parseErrorBody(output.body, context)];
4127
4127
  case 1:
4128
4128
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4129
4129
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4190,7 +4190,7 @@ var deserializeAws_restJson1GetApiMappingsCommandError = function (output, conte
4190
4190
  case 0:
4191
4191
  _a = [__assign({}, output)];
4192
4192
  _c = {};
4193
- return [4, parseBody(output.body, context)];
4193
+ return [4, parseErrorBody(output.body, context)];
4194
4194
  case 1:
4195
4195
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4196
4196
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4257,7 +4257,7 @@ var deserializeAws_restJson1GetApisCommandError = function (output, context) { r
4257
4257
  case 0:
4258
4258
  _a = [__assign({}, output)];
4259
4259
  _c = {};
4260
- return [4, parseBody(output.body, context)];
4260
+ return [4, parseErrorBody(output.body, context)];
4261
4261
  case 1:
4262
4262
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4263
4263
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4351,7 +4351,7 @@ var deserializeAws_restJson1GetAuthorizerCommandError = function (output, contex
4351
4351
  case 0:
4352
4352
  _a = [__assign({}, output)];
4353
4353
  _c = {};
4354
- return [4, parseBody(output.body, context)];
4354
+ return [4, parseErrorBody(output.body, context)];
4355
4355
  case 1:
4356
4356
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4357
4357
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4414,7 +4414,7 @@ var deserializeAws_restJson1GetAuthorizersCommandError = function (output, conte
4414
4414
  case 0:
4415
4415
  _a = [__assign({}, output)];
4416
4416
  _c = {};
4417
- return [4, parseBody(output.body, context)];
4417
+ return [4, parseErrorBody(output.body, context)];
4418
4418
  case 1:
4419
4419
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4420
4420
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4493,7 +4493,7 @@ var deserializeAws_restJson1GetDeploymentCommandError = function (output, contex
4493
4493
  case 0:
4494
4494
  _a = [__assign({}, output)];
4495
4495
  _c = {};
4496
- return [4, parseBody(output.body, context)];
4496
+ return [4, parseErrorBody(output.body, context)];
4497
4497
  case 1:
4498
4498
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4499
4499
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4556,7 +4556,7 @@ var deserializeAws_restJson1GetDeploymentsCommandError = function (output, conte
4556
4556
  case 0:
4557
4557
  _a = [__assign({}, output)];
4558
4558
  _c = {};
4559
- return [4, parseBody(output.body, context)];
4559
+ return [4, parseErrorBody(output.body, context)];
4560
4560
  case 1:
4561
4561
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4562
4562
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4632,7 +4632,7 @@ var deserializeAws_restJson1GetDomainNameCommandError = function (output, contex
4632
4632
  case 0:
4633
4633
  _a = [__assign({}, output)];
4634
4634
  _c = {};
4635
- return [4, parseBody(output.body, context)];
4635
+ return [4, parseErrorBody(output.body, context)];
4636
4636
  case 1:
4637
4637
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4638
4638
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4695,7 +4695,7 @@ var deserializeAws_restJson1GetDomainNamesCommandError = function (output, conte
4695
4695
  case 0:
4696
4696
  _a = [__assign({}, output)];
4697
4697
  _c = {};
4698
- return [4, parseBody(output.body, context)];
4698
+ return [4, parseErrorBody(output.body, context)];
4699
4699
  case 1:
4700
4700
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4701
4701
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4816,7 +4816,7 @@ var deserializeAws_restJson1GetIntegrationCommandError = function (output, conte
4816
4816
  case 0:
4817
4817
  _a = [__assign({}, output)];
4818
4818
  _c = {};
4819
- return [4, parseBody(output.body, context)];
4819
+ return [4, parseErrorBody(output.body, context)];
4820
4820
  case 1:
4821
4821
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4822
4822
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4891,7 +4891,7 @@ var deserializeAws_restJson1GetIntegrationResponseCommandError = function (outpu
4891
4891
  case 0:
4892
4892
  _a = [__assign({}, output)];
4893
4893
  _c = {};
4894
- return [4, parseBody(output.body, context)];
4894
+ return [4, parseErrorBody(output.body, context)];
4895
4895
  case 1:
4896
4896
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4897
4897
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4954,7 +4954,7 @@ var deserializeAws_restJson1GetIntegrationResponsesCommandError = function (outp
4954
4954
  case 0:
4955
4955
  _a = [__assign({}, output)];
4956
4956
  _c = {};
4957
- return [4, parseBody(output.body, context)];
4957
+ return [4, parseErrorBody(output.body, context)];
4958
4958
  case 1:
4959
4959
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4960
4960
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5021,7 +5021,7 @@ var deserializeAws_restJson1GetIntegrationsCommandError = function (output, cont
5021
5021
  case 0:
5022
5022
  _a = [__assign({}, output)];
5023
5023
  _c = {};
5024
- return [4, parseBody(output.body, context)];
5024
+ return [4, parseErrorBody(output.body, context)];
5025
5025
  case 1:
5026
5026
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5027
5027
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5097,7 +5097,7 @@ var deserializeAws_restJson1GetModelCommandError = function (output, context) {
5097
5097
  case 0:
5098
5098
  _a = [__assign({}, output)];
5099
5099
  _c = {};
5100
- return [4, parseBody(output.body, context)];
5100
+ return [4, parseErrorBody(output.body, context)];
5101
5101
  case 1:
5102
5102
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5103
5103
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5160,7 +5160,7 @@ var deserializeAws_restJson1GetModelsCommandError = function (output, context) {
5160
5160
  case 0:
5161
5161
  _a = [__assign({}, output)];
5162
5162
  _c = {};
5163
- return [4, parseBody(output.body, context)];
5163
+ return [4, parseErrorBody(output.body, context)];
5164
5164
  case 1:
5165
5165
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5166
5166
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5224,7 +5224,7 @@ var deserializeAws_restJson1GetModelTemplateCommandError = function (output, con
5224
5224
  case 0:
5225
5225
  _a = [__assign({}, output)];
5226
5226
  _c = {};
5227
- return [4, parseBody(output.body, context)];
5227
+ return [4, parseErrorBody(output.body, context)];
5228
5228
  case 1:
5229
5229
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5230
5230
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5320,7 +5320,7 @@ var deserializeAws_restJson1GetRouteCommandError = function (output, context) {
5320
5320
  case 0:
5321
5321
  _a = [__assign({}, output)];
5322
5322
  _c = {};
5323
- return [4, parseBody(output.body, context)];
5323
+ return [4, parseErrorBody(output.body, context)];
5324
5324
  case 1:
5325
5325
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5326
5326
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5392,7 +5392,7 @@ var deserializeAws_restJson1GetRouteResponseCommandError = function (output, con
5392
5392
  case 0:
5393
5393
  _a = [__assign({}, output)];
5394
5394
  _c = {};
5395
- return [4, parseBody(output.body, context)];
5395
+ return [4, parseErrorBody(output.body, context)];
5396
5396
  case 1:
5397
5397
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5398
5398
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5455,7 +5455,7 @@ var deserializeAws_restJson1GetRouteResponsesCommandError = function (output, co
5455
5455
  case 0:
5456
5456
  _a = [__assign({}, output)];
5457
5457
  _c = {};
5458
- return [4, parseBody(output.body, context)];
5458
+ return [4, parseErrorBody(output.body, context)];
5459
5459
  case 1:
5460
5460
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5461
5461
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5522,7 +5522,7 @@ var deserializeAws_restJson1GetRoutesCommandError = function (output, context) {
5522
5522
  case 0:
5523
5523
  _a = [__assign({}, output)];
5524
5524
  _c = {};
5525
- return [4, parseBody(output.body, context)];
5525
+ return [4, parseErrorBody(output.body, context)];
5526
5526
  case 1:
5527
5527
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5528
5528
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5625,7 +5625,7 @@ var deserializeAws_restJson1GetStageCommandError = function (output, context) {
5625
5625
  case 0:
5626
5626
  _a = [__assign({}, output)];
5627
5627
  _c = {};
5628
- return [4, parseBody(output.body, context)];
5628
+ return [4, parseErrorBody(output.body, context)];
5629
5629
  case 1:
5630
5630
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5631
5631
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5688,7 +5688,7 @@ var deserializeAws_restJson1GetStagesCommandError = function (output, context) {
5688
5688
  case 0:
5689
5689
  _a = [__assign({}, output)];
5690
5690
  _c = {};
5691
- return [4, parseBody(output.body, context)];
5691
+ return [4, parseErrorBody(output.body, context)];
5692
5692
  case 1:
5693
5693
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5694
5694
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5752,7 +5752,7 @@ var deserializeAws_restJson1GetTagsCommandError = function (output, context) { r
5752
5752
  case 0:
5753
5753
  _a = [__assign({}, output)];
5754
5754
  _c = {};
5755
- return [4, parseBody(output.body, context)];
5755
+ return [4, parseErrorBody(output.body, context)];
5756
5756
  case 1:
5757
5757
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5758
5758
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5844,7 +5844,7 @@ var deserializeAws_restJson1GetVpcLinkCommandError = function (output, context)
5844
5844
  case 0:
5845
5845
  _a = [__assign({}, output)];
5846
5846
  _c = {};
5847
- return [4, parseBody(output.body, context)];
5847
+ return [4, parseErrorBody(output.body, context)];
5848
5848
  case 1:
5849
5849
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5850
5850
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5907,7 +5907,7 @@ var deserializeAws_restJson1GetVpcLinksCommandError = function (output, context)
5907
5907
  case 0:
5908
5908
  _a = [__assign({}, output)];
5909
5909
  _c = {};
5910
- return [4, parseBody(output.body, context)];
5910
+ return [4, parseErrorBody(output.body, context)];
5911
5911
  case 1:
5912
5912
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5913
5913
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6012,7 +6012,7 @@ var deserializeAws_restJson1ImportApiCommandError = function (output, context) {
6012
6012
  case 0:
6013
6013
  _a = [__assign({}, output)];
6014
6014
  _c = {};
6015
- return [4, parseBody(output.body, context)];
6015
+ return [4, parseErrorBody(output.body, context)];
6016
6016
  case 1:
6017
6017
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6018
6018
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6125,7 +6125,7 @@ var deserializeAws_restJson1ReimportApiCommandError = function (output, context)
6125
6125
  case 0:
6126
6126
  _a = [__assign({}, output)];
6127
6127
  _c = {};
6128
- return [4, parseBody(output.body, context)];
6128
+ return [4, parseErrorBody(output.body, context)];
6129
6129
  case 1:
6130
6130
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6131
6131
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6188,7 +6188,7 @@ var deserializeAws_restJson1ResetAuthorizersCacheCommandError = function (output
6188
6188
  case 0:
6189
6189
  _a = [__assign({}, output)];
6190
6190
  _c = {};
6191
- return [4, parseBody(output.body, context)];
6191
+ return [4, parseErrorBody(output.body, context)];
6192
6192
  case 1:
6193
6193
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6194
6194
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6243,7 +6243,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
6243
6243
  case 0:
6244
6244
  _a = [__assign({}, output)];
6245
6245
  _c = {};
6246
- return [4, parseBody(output.body, context)];
6246
+ return [4, parseErrorBody(output.body, context)];
6247
6247
  case 1:
6248
6248
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6249
6249
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6306,7 +6306,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
6306
6306
  case 0:
6307
6307
  _a = [__assign({}, output)];
6308
6308
  _c = {};
6309
- return [4, parseBody(output.body, context)];
6309
+ return [4, parseErrorBody(output.body, context)];
6310
6310
  case 1:
6311
6311
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6312
6312
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6419,7 +6419,7 @@ var deserializeAws_restJson1UpdateApiCommandError = function (output, context) {
6419
6419
  case 0:
6420
6420
  _a = [__assign({}, output)];
6421
6421
  _c = {};
6422
- return [4, parseBody(output.body, context)];
6422
+ return [4, parseErrorBody(output.body, context)];
6423
6423
  case 1:
6424
6424
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6425
6425
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6496,7 +6496,7 @@ var deserializeAws_restJson1UpdateApiMappingCommandError = function (output, con
6496
6496
  case 0:
6497
6497
  _a = [__assign({}, output)];
6498
6498
  _c = {};
6499
- return [4, parseBody(output.body, context)];
6499
+ return [4, parseErrorBody(output.body, context)];
6500
6500
  case 1:
6501
6501
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6502
6502
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6594,7 +6594,7 @@ var deserializeAws_restJson1UpdateAuthorizerCommandError = function (output, con
6594
6594
  case 0:
6595
6595
  _a = [__assign({}, output)];
6596
6596
  _c = {};
6597
- return [4, parseBody(output.body, context)];
6597
+ return [4, parseErrorBody(output.body, context)];
6598
6598
  case 1:
6599
6599
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6600
6600
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6677,7 +6677,7 @@ var deserializeAws_restJson1UpdateDeploymentCommandError = function (output, con
6677
6677
  case 0:
6678
6678
  _a = [__assign({}, output)];
6679
6679
  _c = {};
6680
- return [4, parseBody(output.body, context)];
6680
+ return [4, parseErrorBody(output.body, context)];
6681
6681
  case 1:
6682
6682
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6683
6683
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6757,7 +6757,7 @@ var deserializeAws_restJson1UpdateDomainNameCommandError = function (output, con
6757
6757
  case 0:
6758
6758
  _a = [__assign({}, output)];
6759
6759
  _c = {};
6760
- return [4, parseBody(output.body, context)];
6760
+ return [4, parseErrorBody(output.body, context)];
6761
6761
  case 1:
6762
6762
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6763
6763
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6882,7 +6882,7 @@ var deserializeAws_restJson1UpdateIntegrationCommandError = function (output, co
6882
6882
  case 0:
6883
6883
  _a = [__assign({}, output)];
6884
6884
  _c = {};
6885
- return [4, parseBody(output.body, context)];
6885
+ return [4, parseErrorBody(output.body, context)];
6886
6886
  case 1:
6887
6887
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6888
6888
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6965,7 +6965,7 @@ var deserializeAws_restJson1UpdateIntegrationResponseCommandError = function (ou
6965
6965
  case 0:
6966
6966
  _a = [__assign({}, output)];
6967
6967
  _c = {};
6968
- return [4, parseBody(output.body, context)];
6968
+ return [4, parseErrorBody(output.body, context)];
6969
6969
  case 1:
6970
6970
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6971
6971
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -7045,7 +7045,7 @@ var deserializeAws_restJson1UpdateModelCommandError = function (output, context)
7045
7045
  case 0:
7046
7046
  _a = [__assign({}, output)];
7047
7047
  _c = {};
7048
- return [4, parseBody(output.body, context)];
7048
+ return [4, parseErrorBody(output.body, context)];
7049
7049
  case 1:
7050
7050
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7051
7051
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -7149,7 +7149,7 @@ var deserializeAws_restJson1UpdateRouteCommandError = function (output, context)
7149
7149
  case 0:
7150
7150
  _a = [__assign({}, output)];
7151
7151
  _c = {};
7152
- return [4, parseBody(output.body, context)];
7152
+ return [4, parseErrorBody(output.body, context)];
7153
7153
  case 1:
7154
7154
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7155
7155
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -7229,7 +7229,7 @@ var deserializeAws_restJson1UpdateRouteResponseCommandError = function (output,
7229
7229
  case 0:
7230
7230
  _a = [__assign({}, output)];
7231
7231
  _c = {};
7232
- return [4, parseBody(output.body, context)];
7232
+ return [4, parseErrorBody(output.body, context)];
7233
7233
  case 1:
7234
7234
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7235
7235
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -7336,7 +7336,7 @@ var deserializeAws_restJson1UpdateStageCommandError = function (output, context)
7336
7336
  case 0:
7337
7337
  _a = [__assign({}, output)];
7338
7338
  _c = {};
7339
- return [4, parseBody(output.body, context)];
7339
+ return [4, parseErrorBody(output.body, context)];
7340
7340
  case 1:
7341
7341
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7342
7342
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -7428,7 +7428,7 @@ var deserializeAws_restJson1UpdateVpcLinkCommandError = function (output, contex
7428
7428
  case 0:
7429
7429
  _a = [__assign({}, output)];
7430
7430
  _c = {};
7431
- return [4, parseBody(output.body, context)];
7431
+ return [4, parseErrorBody(output.body, context)];
7432
7432
  case 1:
7433
7433
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7434
7434
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -8314,6 +8314,19 @@ var parseBody = function (streamBody, context) {
8314
8314
  return {};
8315
8315
  });
8316
8316
  };
8317
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
8318
+ var value;
8319
+ var _a;
8320
+ return __generator(this, function (_b) {
8321
+ switch (_b.label) {
8322
+ case 0: return [4, parseBody(errorBody, context)];
8323
+ case 1:
8324
+ value = _b.sent();
8325
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
8326
+ return [2, value];
8327
+ }
8328
+ });
8329
+ }); };
8317
8330
  var loadRestJsonErrorCode = function (output, data) {
8318
8331
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
8319
8332
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-apigatewayv2",
3
3
  "description": "AWS SDK for JavaScript Apigatewayv2 Client for Node.js, Browser and React Native",
4
- "version": "3.180.0",
4
+ "version": "3.181.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -19,9 +19,9 @@
19
19
  "dependencies": {
20
20
  "@aws-crypto/sha256-browser": "2.0.0",
21
21
  "@aws-crypto/sha256-js": "2.0.0",
22
- "@aws-sdk/client-sts": "3.180.0",
22
+ "@aws-sdk/client-sts": "3.181.0",
23
23
  "@aws-sdk/config-resolver": "3.178.0",
24
- "@aws-sdk/credential-provider-node": "3.180.0",
24
+ "@aws-sdk/credential-provider-node": "3.181.0",
25
25
  "@aws-sdk/fetch-http-handler": "3.178.0",
26
26
  "@aws-sdk/hash-node": "3.178.0",
27
27
  "@aws-sdk/invalid-dependency": "3.178.0",