@aws-sdk/client-imagebuilder 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-imagebuilder
@@ -1284,7 +1284,7 @@ exports.deserializeAws_restJson1CancelImageCreationCommand = deserializeAws_rest
1284
1284
  const deserializeAws_restJson1CancelImageCreationCommandError = async (output, context) => {
1285
1285
  const parsedOutput = {
1286
1286
  ...output,
1287
- body: await parseBody(output.body, context),
1287
+ body: await parseErrorBody(output.body, context),
1288
1288
  };
1289
1289
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1290
1290
  switch (errorCode) {
@@ -1345,7 +1345,7 @@ exports.deserializeAws_restJson1CreateComponentCommand = deserializeAws_restJson
1345
1345
  const deserializeAws_restJson1CreateComponentCommandError = async (output, context) => {
1346
1346
  const parsedOutput = {
1347
1347
  ...output,
1348
- body: await parseBody(output.body, context),
1348
+ body: await parseErrorBody(output.body, context),
1349
1349
  };
1350
1350
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1351
1351
  switch (errorCode) {
@@ -1415,7 +1415,7 @@ exports.deserializeAws_restJson1CreateContainerRecipeCommand = deserializeAws_re
1415
1415
  const deserializeAws_restJson1CreateContainerRecipeCommandError = async (output, context) => {
1416
1416
  const parsedOutput = {
1417
1417
  ...output,
1418
- body: await parseBody(output.body, context),
1418
+ body: await parseErrorBody(output.body, context),
1419
1419
  };
1420
1420
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1421
1421
  switch (errorCode) {
@@ -1485,7 +1485,7 @@ exports.deserializeAws_restJson1CreateDistributionConfigurationCommand = deseria
1485
1485
  const deserializeAws_restJson1CreateDistributionConfigurationCommandError = async (output, context) => {
1486
1486
  const parsedOutput = {
1487
1487
  ...output,
1488
- body: await parseBody(output.body, context),
1488
+ body: await parseErrorBody(output.body, context),
1489
1489
  };
1490
1490
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1491
1491
  switch (errorCode) {
@@ -1555,7 +1555,7 @@ exports.deserializeAws_restJson1CreateImageCommand = deserializeAws_restJson1Cre
1555
1555
  const deserializeAws_restJson1CreateImageCommandError = async (output, context) => {
1556
1556
  const parsedOutput = {
1557
1557
  ...output,
1558
- body: await parseBody(output.body, context),
1558
+ body: await parseErrorBody(output.body, context),
1559
1559
  };
1560
1560
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1561
1561
  switch (errorCode) {
@@ -1619,7 +1619,7 @@ exports.deserializeAws_restJson1CreateImagePipelineCommand = deserializeAws_rest
1619
1619
  const deserializeAws_restJson1CreateImagePipelineCommandError = async (output, context) => {
1620
1620
  const parsedOutput = {
1621
1621
  ...output,
1622
- body: await parseBody(output.body, context),
1622
+ body: await parseErrorBody(output.body, context),
1623
1623
  };
1624
1624
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1625
1625
  switch (errorCode) {
@@ -1686,7 +1686,7 @@ exports.deserializeAws_restJson1CreateImageRecipeCommand = deserializeAws_restJs
1686
1686
  const deserializeAws_restJson1CreateImageRecipeCommandError = async (output, context) => {
1687
1687
  const parsedOutput = {
1688
1688
  ...output,
1689
- body: await parseBody(output.body, context),
1689
+ body: await parseErrorBody(output.body, context),
1690
1690
  };
1691
1691
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1692
1692
  switch (errorCode) {
@@ -1756,7 +1756,7 @@ exports.deserializeAws_restJson1CreateInfrastructureConfigurationCommand = deser
1756
1756
  const deserializeAws_restJson1CreateInfrastructureConfigurationCommandError = async (output, context) => {
1757
1757
  const parsedOutput = {
1758
1758
  ...output,
1759
- body: await parseBody(output.body, context),
1759
+ body: await parseErrorBody(output.body, context),
1760
1760
  };
1761
1761
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1762
1762
  switch (errorCode) {
@@ -1820,7 +1820,7 @@ exports.deserializeAws_restJson1DeleteComponentCommand = deserializeAws_restJson
1820
1820
  const deserializeAws_restJson1DeleteComponentCommandError = async (output, context) => {
1821
1821
  const parsedOutput = {
1822
1822
  ...output,
1823
- body: await parseBody(output.body, context),
1823
+ body: await parseErrorBody(output.body, context),
1824
1824
  };
1825
1825
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1826
1826
  switch (errorCode) {
@@ -1875,7 +1875,7 @@ exports.deserializeAws_restJson1DeleteContainerRecipeCommand = deserializeAws_re
1875
1875
  const deserializeAws_restJson1DeleteContainerRecipeCommandError = async (output, context) => {
1876
1876
  const parsedOutput = {
1877
1877
  ...output,
1878
- body: await parseBody(output.body, context),
1878
+ body: await parseErrorBody(output.body, context),
1879
1879
  };
1880
1880
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1881
1881
  switch (errorCode) {
@@ -1930,7 +1930,7 @@ exports.deserializeAws_restJson1DeleteDistributionConfigurationCommand = deseria
1930
1930
  const deserializeAws_restJson1DeleteDistributionConfigurationCommandError = async (output, context) => {
1931
1931
  const parsedOutput = {
1932
1932
  ...output,
1933
- body: await parseBody(output.body, context),
1933
+ body: await parseErrorBody(output.body, context),
1934
1934
  };
1935
1935
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1936
1936
  switch (errorCode) {
@@ -1985,7 +1985,7 @@ exports.deserializeAws_restJson1DeleteImageCommand = deserializeAws_restJson1Del
1985
1985
  const deserializeAws_restJson1DeleteImageCommandError = async (output, context) => {
1986
1986
  const parsedOutput = {
1987
1987
  ...output,
1988
- body: await parseBody(output.body, context),
1988
+ body: await parseErrorBody(output.body, context),
1989
1989
  };
1990
1990
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1991
1991
  switch (errorCode) {
@@ -2040,7 +2040,7 @@ exports.deserializeAws_restJson1DeleteImagePipelineCommand = deserializeAws_rest
2040
2040
  const deserializeAws_restJson1DeleteImagePipelineCommandError = async (output, context) => {
2041
2041
  const parsedOutput = {
2042
2042
  ...output,
2043
- body: await parseBody(output.body, context),
2043
+ body: await parseErrorBody(output.body, context),
2044
2044
  };
2045
2045
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2046
2046
  switch (errorCode) {
@@ -2095,7 +2095,7 @@ exports.deserializeAws_restJson1DeleteImageRecipeCommand = deserializeAws_restJs
2095
2095
  const deserializeAws_restJson1DeleteImageRecipeCommandError = async (output, context) => {
2096
2096
  const parsedOutput = {
2097
2097
  ...output,
2098
- body: await parseBody(output.body, context),
2098
+ body: await parseErrorBody(output.body, context),
2099
2099
  };
2100
2100
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2101
2101
  switch (errorCode) {
@@ -2150,7 +2150,7 @@ exports.deserializeAws_restJson1DeleteInfrastructureConfigurationCommand = deser
2150
2150
  const deserializeAws_restJson1DeleteInfrastructureConfigurationCommandError = async (output, context) => {
2151
2151
  const parsedOutput = {
2152
2152
  ...output,
2153
- body: await parseBody(output.body, context),
2153
+ body: await parseErrorBody(output.body, context),
2154
2154
  };
2155
2155
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2156
2156
  switch (errorCode) {
@@ -2205,7 +2205,7 @@ exports.deserializeAws_restJson1GetComponentCommand = deserializeAws_restJson1Ge
2205
2205
  const deserializeAws_restJson1GetComponentCommandError = async (output, context) => {
2206
2206
  const parsedOutput = {
2207
2207
  ...output,
2208
- body: await parseBody(output.body, context),
2208
+ body: await parseErrorBody(output.body, context),
2209
2209
  };
2210
2210
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2211
2211
  switch (errorCode) {
@@ -2257,7 +2257,7 @@ exports.deserializeAws_restJson1GetComponentPolicyCommand = deserializeAws_restJ
2257
2257
  const deserializeAws_restJson1GetComponentPolicyCommandError = async (output, context) => {
2258
2258
  const parsedOutput = {
2259
2259
  ...output,
2260
- body: await parseBody(output.body, context),
2260
+ body: await parseErrorBody(output.body, context),
2261
2261
  };
2262
2262
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2263
2263
  switch (errorCode) {
@@ -2309,7 +2309,7 @@ exports.deserializeAws_restJson1GetContainerRecipeCommand = deserializeAws_restJ
2309
2309
  const deserializeAws_restJson1GetContainerRecipeCommandError = async (output, context) => {
2310
2310
  const parsedOutput = {
2311
2311
  ...output,
2312
- body: await parseBody(output.body, context),
2312
+ body: await parseErrorBody(output.body, context),
2313
2313
  };
2314
2314
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2315
2315
  switch (errorCode) {
@@ -2361,7 +2361,7 @@ exports.deserializeAws_restJson1GetContainerRecipePolicyCommand = deserializeAws
2361
2361
  const deserializeAws_restJson1GetContainerRecipePolicyCommandError = async (output, context) => {
2362
2362
  const parsedOutput = {
2363
2363
  ...output,
2364
- body: await parseBody(output.body, context),
2364
+ body: await parseErrorBody(output.body, context),
2365
2365
  };
2366
2366
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2367
2367
  switch (errorCode) {
@@ -2413,7 +2413,7 @@ exports.deserializeAws_restJson1GetDistributionConfigurationCommand = deserializ
2413
2413
  const deserializeAws_restJson1GetDistributionConfigurationCommandError = async (output, context) => {
2414
2414
  const parsedOutput = {
2415
2415
  ...output,
2416
- body: await parseBody(output.body, context),
2416
+ body: await parseErrorBody(output.body, context),
2417
2417
  };
2418
2418
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2419
2419
  switch (errorCode) {
@@ -2465,7 +2465,7 @@ exports.deserializeAws_restJson1GetImageCommand = deserializeAws_restJson1GetIma
2465
2465
  const deserializeAws_restJson1GetImageCommandError = async (output, context) => {
2466
2466
  const parsedOutput = {
2467
2467
  ...output,
2468
- body: await parseBody(output.body, context),
2468
+ body: await parseErrorBody(output.body, context),
2469
2469
  };
2470
2470
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2471
2471
  switch (errorCode) {
@@ -2517,7 +2517,7 @@ exports.deserializeAws_restJson1GetImagePipelineCommand = deserializeAws_restJso
2517
2517
  const deserializeAws_restJson1GetImagePipelineCommandError = async (output, context) => {
2518
2518
  const parsedOutput = {
2519
2519
  ...output,
2520
- body: await parseBody(output.body, context),
2520
+ body: await parseErrorBody(output.body, context),
2521
2521
  };
2522
2522
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2523
2523
  switch (errorCode) {
@@ -2569,7 +2569,7 @@ exports.deserializeAws_restJson1GetImagePolicyCommand = deserializeAws_restJson1
2569
2569
  const deserializeAws_restJson1GetImagePolicyCommandError = async (output, context) => {
2570
2570
  const parsedOutput = {
2571
2571
  ...output,
2572
- body: await parseBody(output.body, context),
2572
+ body: await parseErrorBody(output.body, context),
2573
2573
  };
2574
2574
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2575
2575
  switch (errorCode) {
@@ -2621,7 +2621,7 @@ exports.deserializeAws_restJson1GetImageRecipeCommand = deserializeAws_restJson1
2621
2621
  const deserializeAws_restJson1GetImageRecipeCommandError = 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) {
@@ -2673,7 +2673,7 @@ exports.deserializeAws_restJson1GetImageRecipePolicyCommand = deserializeAws_res
2673
2673
  const deserializeAws_restJson1GetImageRecipePolicyCommandError = async (output, context) => {
2674
2674
  const parsedOutput = {
2675
2675
  ...output,
2676
- body: await parseBody(output.body, context),
2676
+ body: await parseErrorBody(output.body, context),
2677
2677
  };
2678
2678
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2679
2679
  switch (errorCode) {
@@ -2725,7 +2725,7 @@ exports.deserializeAws_restJson1GetInfrastructureConfigurationCommand = deserial
2725
2725
  const deserializeAws_restJson1GetInfrastructureConfigurationCommandError = async (output, context) => {
2726
2726
  const parsedOutput = {
2727
2727
  ...output,
2728
- body: await parseBody(output.body, context),
2728
+ body: await parseErrorBody(output.body, context),
2729
2729
  };
2730
2730
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2731
2731
  switch (errorCode) {
@@ -2780,7 +2780,7 @@ exports.deserializeAws_restJson1ImportComponentCommand = deserializeAws_restJson
2780
2780
  const deserializeAws_restJson1ImportComponentCommandError = async (output, context) => {
2781
2781
  const parsedOutput = {
2782
2782
  ...output,
2783
- body: await parseBody(output.body, context),
2783
+ body: await parseErrorBody(output.body, context),
2784
2784
  };
2785
2785
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2786
2786
  switch (errorCode) {
@@ -2847,7 +2847,7 @@ exports.deserializeAws_restJson1ImportVmImageCommand = deserializeAws_restJson1I
2847
2847
  const deserializeAws_restJson1ImportVmImageCommandError = async (output, context) => {
2848
2848
  const parsedOutput = {
2849
2849
  ...output,
2850
- body: await parseBody(output.body, context),
2850
+ body: await parseErrorBody(output.body, context),
2851
2851
  };
2852
2852
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2853
2853
  switch (errorCode) {
@@ -2893,7 +2893,7 @@ exports.deserializeAws_restJson1ListComponentBuildVersionsCommand = deserializeA
2893
2893
  const deserializeAws_restJson1ListComponentBuildVersionsCommandError = async (output, context) => {
2894
2894
  const parsedOutput = {
2895
2895
  ...output,
2896
- body: await parseBody(output.body, context),
2896
+ body: await parseErrorBody(output.body, context),
2897
2897
  };
2898
2898
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2899
2899
  switch (errorCode) {
@@ -2951,7 +2951,7 @@ exports.deserializeAws_restJson1ListComponentsCommand = deserializeAws_restJson1
2951
2951
  const deserializeAws_restJson1ListComponentsCommandError = async (output, context) => {
2952
2952
  const parsedOutput = {
2953
2953
  ...output,
2954
- body: await parseBody(output.body, context),
2954
+ body: await parseErrorBody(output.body, context),
2955
2955
  };
2956
2956
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2957
2957
  switch (errorCode) {
@@ -3009,7 +3009,7 @@ exports.deserializeAws_restJson1ListContainerRecipesCommand = deserializeAws_res
3009
3009
  const deserializeAws_restJson1ListContainerRecipesCommandError = async (output, context) => {
3010
3010
  const parsedOutput = {
3011
3011
  ...output,
3012
- body: await parseBody(output.body, context),
3012
+ body: await parseErrorBody(output.body, context),
3013
3013
  };
3014
3014
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3015
3015
  switch (errorCode) {
@@ -3067,7 +3067,7 @@ exports.deserializeAws_restJson1ListDistributionConfigurationsCommand = deserial
3067
3067
  const deserializeAws_restJson1ListDistributionConfigurationsCommandError = async (output, context) => {
3068
3068
  const parsedOutput = {
3069
3069
  ...output,
3070
- body: await parseBody(output.body, context),
3070
+ body: await parseErrorBody(output.body, context),
3071
3071
  };
3072
3072
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3073
3073
  switch (errorCode) {
@@ -3125,7 +3125,7 @@ exports.deserializeAws_restJson1ListImageBuildVersionsCommand = deserializeAws_r
3125
3125
  const deserializeAws_restJson1ListImageBuildVersionsCommandError = async (output, context) => {
3126
3126
  const parsedOutput = {
3127
3127
  ...output,
3128
- body: await parseBody(output.body, context),
3128
+ body: await parseErrorBody(output.body, context),
3129
3129
  };
3130
3130
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3131
3131
  switch (errorCode) {
@@ -3183,7 +3183,7 @@ exports.deserializeAws_restJson1ListImagePackagesCommand = deserializeAws_restJs
3183
3183
  const deserializeAws_restJson1ListImagePackagesCommandError = async (output, context) => {
3184
3184
  const parsedOutput = {
3185
3185
  ...output,
3186
- body: await parseBody(output.body, context),
3186
+ body: await parseErrorBody(output.body, context),
3187
3187
  };
3188
3188
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3189
3189
  switch (errorCode) {
@@ -3244,7 +3244,7 @@ exports.deserializeAws_restJson1ListImagePipelineImagesCommand = deserializeAws_
3244
3244
  const deserializeAws_restJson1ListImagePipelineImagesCommandError = async (output, context) => {
3245
3245
  const parsedOutput = {
3246
3246
  ...output,
3247
- body: await parseBody(output.body, context),
3247
+ body: await parseErrorBody(output.body, context),
3248
3248
  };
3249
3249
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3250
3250
  switch (errorCode) {
@@ -3305,7 +3305,7 @@ exports.deserializeAws_restJson1ListImagePipelinesCommand = deserializeAws_restJ
3305
3305
  const deserializeAws_restJson1ListImagePipelinesCommandError = async (output, context) => {
3306
3306
  const parsedOutput = {
3307
3307
  ...output,
3308
- body: await parseBody(output.body, context),
3308
+ body: await parseErrorBody(output.body, context),
3309
3309
  };
3310
3310
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3311
3311
  switch (errorCode) {
@@ -3363,7 +3363,7 @@ exports.deserializeAws_restJson1ListImageRecipesCommand = deserializeAws_restJso
3363
3363
  const deserializeAws_restJson1ListImageRecipesCommandError = async (output, context) => {
3364
3364
  const parsedOutput = {
3365
3365
  ...output,
3366
- body: await parseBody(output.body, context),
3366
+ body: await parseErrorBody(output.body, context),
3367
3367
  };
3368
3368
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3369
3369
  switch (errorCode) {
@@ -3421,7 +3421,7 @@ exports.deserializeAws_restJson1ListImagesCommand = deserializeAws_restJson1List
3421
3421
  const deserializeAws_restJson1ListImagesCommandError = async (output, context) => {
3422
3422
  const parsedOutput = {
3423
3423
  ...output,
3424
- body: await parseBody(output.body, context),
3424
+ body: await parseErrorBody(output.body, context),
3425
3425
  };
3426
3426
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3427
3427
  switch (errorCode) {
@@ -3479,7 +3479,7 @@ exports.deserializeAws_restJson1ListInfrastructureConfigurationsCommand = deseri
3479
3479
  const deserializeAws_restJson1ListInfrastructureConfigurationsCommandError = async (output, context) => {
3480
3480
  const parsedOutput = {
3481
3481
  ...output,
3482
- body: await parseBody(output.body, context),
3482
+ body: await parseErrorBody(output.body, context),
3483
3483
  };
3484
3484
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3485
3485
  switch (errorCode) {
@@ -3531,7 +3531,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
3531
3531
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
3532
3532
  const parsedOutput = {
3533
3533
  ...output,
3534
- body: await parseBody(output.body, context),
3534
+ body: await parseErrorBody(output.body, context),
3535
3535
  };
3536
3536
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3537
3537
  switch (errorCode) {
@@ -3574,7 +3574,7 @@ exports.deserializeAws_restJson1PutComponentPolicyCommand = deserializeAws_restJ
3574
3574
  const deserializeAws_restJson1PutComponentPolicyCommandError = async (output, context) => {
3575
3575
  const parsedOutput = {
3576
3576
  ...output,
3577
- body: await parseBody(output.body, context),
3577
+ body: await parseErrorBody(output.body, context),
3578
3578
  };
3579
3579
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3580
3580
  switch (errorCode) {
@@ -3632,7 +3632,7 @@ exports.deserializeAws_restJson1PutContainerRecipePolicyCommand = deserializeAws
3632
3632
  const deserializeAws_restJson1PutContainerRecipePolicyCommandError = async (output, context) => {
3633
3633
  const parsedOutput = {
3634
3634
  ...output,
3635
- body: await parseBody(output.body, context),
3635
+ body: await parseErrorBody(output.body, context),
3636
3636
  };
3637
3637
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3638
3638
  switch (errorCode) {
@@ -3690,7 +3690,7 @@ exports.deserializeAws_restJson1PutImagePolicyCommand = deserializeAws_restJson1
3690
3690
  const deserializeAws_restJson1PutImagePolicyCommandError = async (output, context) => {
3691
3691
  const parsedOutput = {
3692
3692
  ...output,
3693
- body: await parseBody(output.body, context),
3693
+ body: await parseErrorBody(output.body, context),
3694
3694
  };
3695
3695
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3696
3696
  switch (errorCode) {
@@ -3748,7 +3748,7 @@ exports.deserializeAws_restJson1PutImageRecipePolicyCommand = deserializeAws_res
3748
3748
  const deserializeAws_restJson1PutImageRecipePolicyCommandError = async (output, context) => {
3749
3749
  const parsedOutput = {
3750
3750
  ...output,
3751
- body: await parseBody(output.body, context),
3751
+ body: await parseErrorBody(output.body, context),
3752
3752
  };
3753
3753
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3754
3754
  switch (errorCode) {
@@ -3809,7 +3809,7 @@ exports.deserializeAws_restJson1StartImagePipelineExecutionCommand = deserialize
3809
3809
  const deserializeAws_restJson1StartImagePipelineExecutionCommandError = async (output, context) => {
3810
3810
  const parsedOutput = {
3811
3811
  ...output,
3812
- body: await parseBody(output.body, context),
3812
+ body: await parseErrorBody(output.body, context),
3813
3813
  };
3814
3814
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3815
3815
  switch (errorCode) {
@@ -3864,7 +3864,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
3864
3864
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
3865
3865
  const parsedOutput = {
3866
3866
  ...output,
3867
- body: await parseBody(output.body, context),
3867
+ body: await parseErrorBody(output.body, context),
3868
3868
  };
3869
3869
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3870
3870
  switch (errorCode) {
@@ -3901,7 +3901,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
3901
3901
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
3902
3902
  const parsedOutput = {
3903
3903
  ...output,
3904
- body: await parseBody(output.body, context),
3904
+ body: await parseErrorBody(output.body, context),
3905
3905
  };
3906
3906
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3907
3907
  switch (errorCode) {
@@ -3947,7 +3947,7 @@ exports.deserializeAws_restJson1UpdateDistributionConfigurationCommand = deseria
3947
3947
  const deserializeAws_restJson1UpdateDistributionConfigurationCommandError = async (output, context) => {
3948
3948
  const parsedOutput = {
3949
3949
  ...output,
3950
- body: await parseBody(output.body, context),
3950
+ body: await parseErrorBody(output.body, context),
3951
3951
  };
3952
3952
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3953
3953
  switch (errorCode) {
@@ -4011,7 +4011,7 @@ exports.deserializeAws_restJson1UpdateImagePipelineCommand = deserializeAws_rest
4011
4011
  const deserializeAws_restJson1UpdateImagePipelineCommandError = async (output, context) => {
4012
4012
  const parsedOutput = {
4013
4013
  ...output,
4014
- body: await parseBody(output.body, context),
4014
+ body: await parseErrorBody(output.body, context),
4015
4015
  };
4016
4016
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4017
4017
  switch (errorCode) {
@@ -4072,7 +4072,7 @@ exports.deserializeAws_restJson1UpdateInfrastructureConfigurationCommand = deser
4072
4072
  const deserializeAws_restJson1UpdateInfrastructureConfigurationCommandError = async (output, context) => {
4073
4073
  const parsedOutput = {
4074
4074
  ...output,
4075
- body: await parseBody(output.body, context),
4075
+ body: await parseErrorBody(output.body, context),
4076
4076
  };
4077
4077
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4078
4078
  switch (errorCode) {
@@ -5546,6 +5546,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
5546
5546
  }
5547
5547
  return {};
5548
5548
  });
5549
+ const parseErrorBody = async (errorBody, context) => {
5550
+ var _a;
5551
+ const value = await parseBody(errorBody, context);
5552
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
5553
+ return value;
5554
+ };
5549
5555
  const loadRestJsonErrorCode = (output, data) => {
5550
5556
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
5551
5557
  const sanitizeErrorCode = (rawValue) => {
@@ -1336,7 +1336,7 @@ var deserializeAws_restJson1CancelImageCreationCommandError = function (output,
1336
1336
  case 0:
1337
1337
  _a = [__assign({}, output)];
1338
1338
  _c = {};
1339
- return [4, parseBody(output.body, context)];
1339
+ return [4, parseErrorBody(output.body, context)];
1340
1340
  case 1:
1341
1341
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1342
1342
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1426,7 +1426,7 @@ var deserializeAws_restJson1CreateComponentCommandError = function (output, cont
1426
1426
  case 0:
1427
1427
  _a = [__assign({}, output)];
1428
1428
  _c = {};
1429
- return [4, parseBody(output.body, context)];
1429
+ return [4, parseErrorBody(output.body, context)];
1430
1430
  case 1:
1431
1431
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1432
1432
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1528,7 +1528,7 @@ var deserializeAws_restJson1CreateContainerRecipeCommandError = function (output
1528
1528
  case 0:
1529
1529
  _a = [__assign({}, output)];
1530
1530
  _c = {};
1531
- return [4, parseBody(output.body, context)];
1531
+ return [4, parseErrorBody(output.body, context)];
1532
1532
  case 1:
1533
1533
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1534
1534
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1630,7 +1630,7 @@ var deserializeAws_restJson1CreateDistributionConfigurationCommandError = functi
1630
1630
  case 0:
1631
1631
  _a = [__assign({}, output)];
1632
1632
  _c = {};
1633
- return [4, parseBody(output.body, context)];
1633
+ return [4, parseErrorBody(output.body, context)];
1634
1634
  case 1:
1635
1635
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1636
1636
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1732,7 +1732,7 @@ var deserializeAws_restJson1CreateImageCommandError = function (output, context)
1732
1732
  case 0:
1733
1733
  _a = [__assign({}, output)];
1734
1734
  _c = {};
1735
- return [4, parseBody(output.body, context)];
1735
+ return [4, parseErrorBody(output.body, context)];
1736
1736
  case 1:
1737
1737
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1738
1738
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1826,7 +1826,7 @@ var deserializeAws_restJson1CreateImagePipelineCommandError = function (output,
1826
1826
  case 0:
1827
1827
  _a = [__assign({}, output)];
1828
1828
  _c = {};
1829
- return [4, parseBody(output.body, context)];
1829
+ return [4, parseErrorBody(output.body, context)];
1830
1830
  case 1:
1831
1831
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1832
1832
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1924,7 +1924,7 @@ var deserializeAws_restJson1CreateImageRecipeCommandError = function (output, co
1924
1924
  case 0:
1925
1925
  _a = [__assign({}, output)];
1926
1926
  _c = {};
1927
- return [4, parseBody(output.body, context)];
1927
+ return [4, parseErrorBody(output.body, context)];
1928
1928
  case 1:
1929
1929
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1930
1930
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2026,7 +2026,7 @@ var deserializeAws_restJson1CreateInfrastructureConfigurationCommandError = func
2026
2026
  case 0:
2027
2027
  _a = [__assign({}, output)];
2028
2028
  _c = {};
2029
- return [4, parseBody(output.body, context)];
2029
+ return [4, parseErrorBody(output.body, context)];
2030
2030
  case 1:
2031
2031
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2032
2032
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2121,7 +2121,7 @@ var deserializeAws_restJson1DeleteComponentCommandError = function (output, cont
2121
2121
  case 0:
2122
2122
  _a = [__assign({}, output)];
2123
2123
  _c = {};
2124
- return [4, parseBody(output.body, context)];
2124
+ return [4, parseErrorBody(output.body, context)];
2125
2125
  case 1:
2126
2126
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2127
2127
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2204,7 +2204,7 @@ var deserializeAws_restJson1DeleteContainerRecipeCommandError = function (output
2204
2204
  case 0:
2205
2205
  _a = [__assign({}, output)];
2206
2206
  _c = {};
2207
- return [4, parseBody(output.body, context)];
2207
+ return [4, parseErrorBody(output.body, context)];
2208
2208
  case 1:
2209
2209
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2210
2210
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2287,7 +2287,7 @@ var deserializeAws_restJson1DeleteDistributionConfigurationCommandError = functi
2287
2287
  case 0:
2288
2288
  _a = [__assign({}, output)];
2289
2289
  _c = {};
2290
- return [4, parseBody(output.body, context)];
2290
+ return [4, parseErrorBody(output.body, context)];
2291
2291
  case 1:
2292
2292
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2293
2293
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2370,7 +2370,7 @@ var deserializeAws_restJson1DeleteImageCommandError = function (output, context)
2370
2370
  case 0:
2371
2371
  _a = [__assign({}, output)];
2372
2372
  _c = {};
2373
- return [4, parseBody(output.body, context)];
2373
+ return [4, parseErrorBody(output.body, context)];
2374
2374
  case 1:
2375
2375
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2376
2376
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2453,7 +2453,7 @@ var deserializeAws_restJson1DeleteImagePipelineCommandError = function (output,
2453
2453
  case 0:
2454
2454
  _a = [__assign({}, output)];
2455
2455
  _c = {};
2456
- return [4, parseBody(output.body, context)];
2456
+ return [4, parseErrorBody(output.body, context)];
2457
2457
  case 1:
2458
2458
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2459
2459
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2536,7 +2536,7 @@ var deserializeAws_restJson1DeleteImageRecipeCommandError = function (output, co
2536
2536
  case 0:
2537
2537
  _a = [__assign({}, output)];
2538
2538
  _c = {};
2539
- return [4, parseBody(output.body, context)];
2539
+ return [4, parseErrorBody(output.body, context)];
2540
2540
  case 1:
2541
2541
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2542
2542
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2619,7 +2619,7 @@ var deserializeAws_restJson1DeleteInfrastructureConfigurationCommandError = func
2619
2619
  case 0:
2620
2620
  _a = [__assign({}, output)];
2621
2621
  _c = {};
2622
- return [4, parseBody(output.body, context)];
2622
+ return [4, parseErrorBody(output.body, context)];
2623
2623
  case 1:
2624
2624
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2625
2625
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2702,7 +2702,7 @@ var deserializeAws_restJson1GetComponentCommandError = function (output, context
2702
2702
  case 0:
2703
2703
  _a = [__assign({}, output)];
2704
2704
  _c = {};
2705
- return [4, parseBody(output.body, context)];
2705
+ return [4, parseErrorBody(output.body, context)];
2706
2706
  case 1:
2707
2707
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2708
2708
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2781,7 +2781,7 @@ var deserializeAws_restJson1GetComponentPolicyCommandError = function (output, c
2781
2781
  case 0:
2782
2782
  _a = [__assign({}, output)];
2783
2783
  _c = {};
2784
- return [4, parseBody(output.body, context)];
2784
+ return [4, parseErrorBody(output.body, context)];
2785
2785
  case 1:
2786
2786
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2787
2787
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2860,7 +2860,7 @@ var deserializeAws_restJson1GetContainerRecipeCommandError = function (output, c
2860
2860
  case 0:
2861
2861
  _a = [__assign({}, output)];
2862
2862
  _c = {};
2863
- return [4, parseBody(output.body, context)];
2863
+ return [4, parseErrorBody(output.body, context)];
2864
2864
  case 1:
2865
2865
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2866
2866
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2939,7 +2939,7 @@ var deserializeAws_restJson1GetContainerRecipePolicyCommandError = function (out
2939
2939
  case 0:
2940
2940
  _a = [__assign({}, output)];
2941
2941
  _c = {};
2942
- return [4, parseBody(output.body, context)];
2942
+ return [4, parseErrorBody(output.body, context)];
2943
2943
  case 1:
2944
2944
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2945
2945
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3018,7 +3018,7 @@ var deserializeAws_restJson1GetDistributionConfigurationCommandError = function
3018
3018
  case 0:
3019
3019
  _a = [__assign({}, output)];
3020
3020
  _c = {};
3021
- return [4, parseBody(output.body, context)];
3021
+ return [4, parseErrorBody(output.body, context)];
3022
3022
  case 1:
3023
3023
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3024
3024
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3097,7 +3097,7 @@ var deserializeAws_restJson1GetImageCommandError = function (output, context) {
3097
3097
  case 0:
3098
3098
  _a = [__assign({}, output)];
3099
3099
  _c = {};
3100
- return [4, parseBody(output.body, context)];
3100
+ return [4, parseErrorBody(output.body, context)];
3101
3101
  case 1:
3102
3102
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3103
3103
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3176,7 +3176,7 @@ var deserializeAws_restJson1GetImagePipelineCommandError = function (output, con
3176
3176
  case 0:
3177
3177
  _a = [__assign({}, output)];
3178
3178
  _c = {};
3179
- return [4, parseBody(output.body, context)];
3179
+ return [4, parseErrorBody(output.body, context)];
3180
3180
  case 1:
3181
3181
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3182
3182
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3255,7 +3255,7 @@ var deserializeAws_restJson1GetImagePolicyCommandError = function (output, conte
3255
3255
  case 0:
3256
3256
  _a = [__assign({}, output)];
3257
3257
  _c = {};
3258
- return [4, parseBody(output.body, context)];
3258
+ return [4, parseErrorBody(output.body, context)];
3259
3259
  case 1:
3260
3260
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3261
3261
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3334,7 +3334,7 @@ var deserializeAws_restJson1GetImageRecipeCommandError = function (output, conte
3334
3334
  case 0:
3335
3335
  _a = [__assign({}, output)];
3336
3336
  _c = {};
3337
- return [4, parseBody(output.body, context)];
3337
+ return [4, parseErrorBody(output.body, context)];
3338
3338
  case 1:
3339
3339
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3340
3340
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3413,7 +3413,7 @@ var deserializeAws_restJson1GetImageRecipePolicyCommandError = function (output,
3413
3413
  case 0:
3414
3414
  _a = [__assign({}, output)];
3415
3415
  _c = {};
3416
- return [4, parseBody(output.body, context)];
3416
+ return [4, parseErrorBody(output.body, context)];
3417
3417
  case 1:
3418
3418
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3419
3419
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3492,7 +3492,7 @@ var deserializeAws_restJson1GetInfrastructureConfigurationCommandError = functio
3492
3492
  case 0:
3493
3493
  _a = [__assign({}, output)];
3494
3494
  _c = {};
3495
- return [4, parseBody(output.body, context)];
3495
+ return [4, parseErrorBody(output.body, context)];
3496
3496
  case 1:
3497
3497
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3498
3498
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3574,7 +3574,7 @@ var deserializeAws_restJson1ImportComponentCommandError = function (output, cont
3574
3574
  case 0:
3575
3575
  _a = [__assign({}, output)];
3576
3576
  _c = {};
3577
- return [4, parseBody(output.body, context)];
3577
+ return [4, parseErrorBody(output.body, context)];
3578
3578
  case 1:
3579
3579
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3580
3580
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3672,7 +3672,7 @@ var deserializeAws_restJson1ImportVmImageCommandError = function (output, contex
3672
3672
  case 0:
3673
3673
  _a = [__assign({}, output)];
3674
3674
  _c = {};
3675
- return [4, parseBody(output.body, context)];
3675
+ return [4, parseErrorBody(output.body, context)];
3676
3676
  case 1:
3677
3677
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3678
3678
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3742,7 +3742,7 @@ var deserializeAws_restJson1ListComponentBuildVersionsCommandError = function (o
3742
3742
  case 0:
3743
3743
  _a = [__assign({}, output)];
3744
3744
  _c = {};
3745
- return [4, parseBody(output.body, context)];
3745
+ return [4, parseErrorBody(output.body, context)];
3746
3746
  case 1:
3747
3747
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3748
3748
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3828,7 +3828,7 @@ var deserializeAws_restJson1ListComponentsCommandError = function (output, conte
3828
3828
  case 0:
3829
3829
  _a = [__assign({}, output)];
3830
3830
  _c = {};
3831
- return [4, parseBody(output.body, context)];
3831
+ return [4, parseErrorBody(output.body, context)];
3832
3832
  case 1:
3833
3833
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3834
3834
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3914,7 +3914,7 @@ var deserializeAws_restJson1ListContainerRecipesCommandError = function (output,
3914
3914
  case 0:
3915
3915
  _a = [__assign({}, output)];
3916
3916
  _c = {};
3917
- return [4, parseBody(output.body, context)];
3917
+ return [4, parseErrorBody(output.body, context)];
3918
3918
  case 1:
3919
3919
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3920
3920
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4000,7 +4000,7 @@ var deserializeAws_restJson1ListDistributionConfigurationsCommandError = functio
4000
4000
  case 0:
4001
4001
  _a = [__assign({}, output)];
4002
4002
  _c = {};
4003
- return [4, parseBody(output.body, context)];
4003
+ return [4, parseErrorBody(output.body, context)];
4004
4004
  case 1:
4005
4005
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4006
4006
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4086,7 +4086,7 @@ var deserializeAws_restJson1ListImageBuildVersionsCommandError = function (outpu
4086
4086
  case 0:
4087
4087
  _a = [__assign({}, output)];
4088
4088
  _c = {};
4089
- return [4, parseBody(output.body, context)];
4089
+ return [4, parseErrorBody(output.body, context)];
4090
4090
  case 1:
4091
4091
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4092
4092
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4172,7 +4172,7 @@ var deserializeAws_restJson1ListImagePackagesCommandError = function (output, co
4172
4172
  case 0:
4173
4173
  _a = [__assign({}, output)];
4174
4174
  _c = {};
4175
- return [4, parseBody(output.body, context)];
4175
+ return [4, parseErrorBody(output.body, context)];
4176
4176
  case 1:
4177
4177
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4178
4178
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4262,7 +4262,7 @@ var deserializeAws_restJson1ListImagePipelineImagesCommandError = function (outp
4262
4262
  case 0:
4263
4263
  _a = [__assign({}, output)];
4264
4264
  _c = {};
4265
- return [4, parseBody(output.body, context)];
4265
+ return [4, parseErrorBody(output.body, context)];
4266
4266
  case 1:
4267
4267
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4268
4268
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4352,7 +4352,7 @@ var deserializeAws_restJson1ListImagePipelinesCommandError = function (output, c
4352
4352
  case 0:
4353
4353
  _a = [__assign({}, output)];
4354
4354
  _c = {};
4355
- return [4, parseBody(output.body, context)];
4355
+ return [4, parseErrorBody(output.body, context)];
4356
4356
  case 1:
4357
4357
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4358
4358
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4438,7 +4438,7 @@ var deserializeAws_restJson1ListImageRecipesCommandError = function (output, con
4438
4438
  case 0:
4439
4439
  _a = [__assign({}, output)];
4440
4440
  _c = {};
4441
- return [4, parseBody(output.body, context)];
4441
+ return [4, parseErrorBody(output.body, context)];
4442
4442
  case 1:
4443
4443
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4444
4444
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4524,7 +4524,7 @@ var deserializeAws_restJson1ListImagesCommandError = function (output, context)
4524
4524
  case 0:
4525
4525
  _a = [__assign({}, output)];
4526
4526
  _c = {};
4527
- return [4, parseBody(output.body, context)];
4527
+ return [4, parseErrorBody(output.body, context)];
4528
4528
  case 1:
4529
4529
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4530
4530
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4610,7 +4610,7 @@ var deserializeAws_restJson1ListInfrastructureConfigurationsCommandError = funct
4610
4610
  case 0:
4611
4611
  _a = [__assign({}, output)];
4612
4612
  _c = {};
4613
- return [4, parseBody(output.body, context)];
4613
+ return [4, parseErrorBody(output.body, context)];
4614
4614
  case 1:
4615
4615
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4616
4616
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4690,7 +4690,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
4690
4690
  case 0:
4691
4691
  _a = [__assign({}, output)];
4692
4692
  _c = {};
4693
- return [4, parseBody(output.body, context)];
4693
+ return [4, parseErrorBody(output.body, context)];
4694
4694
  case 1:
4695
4695
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4696
4696
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4757,7 +4757,7 @@ var deserializeAws_restJson1PutComponentPolicyCommandError = function (output, c
4757
4757
  case 0:
4758
4758
  _a = [__assign({}, output)];
4759
4759
  _c = {};
4760
- return [4, parseBody(output.body, context)];
4760
+ return [4, parseErrorBody(output.body, context)];
4761
4761
  case 1:
4762
4762
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4763
4763
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4844,7 +4844,7 @@ var deserializeAws_restJson1PutContainerRecipePolicyCommandError = function (out
4844
4844
  case 0:
4845
4845
  _a = [__assign({}, output)];
4846
4846
  _c = {};
4847
- return [4, parseBody(output.body, context)];
4847
+ return [4, parseErrorBody(output.body, context)];
4848
4848
  case 1:
4849
4849
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4850
4850
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4931,7 +4931,7 @@ var deserializeAws_restJson1PutImagePolicyCommandError = function (output, conte
4931
4931
  case 0:
4932
4932
  _a = [__assign({}, output)];
4933
4933
  _c = {};
4934
- return [4, parseBody(output.body, context)];
4934
+ return [4, parseErrorBody(output.body, context)];
4935
4935
  case 1:
4936
4936
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4937
4937
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5018,7 +5018,7 @@ var deserializeAws_restJson1PutImageRecipePolicyCommandError = function (output,
5018
5018
  case 0:
5019
5019
  _a = [__assign({}, output)];
5020
5020
  _c = {};
5021
- return [4, parseBody(output.body, context)];
5021
+ return [4, parseErrorBody(output.body, context)];
5022
5022
  case 1:
5023
5023
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5024
5024
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5108,7 +5108,7 @@ var deserializeAws_restJson1StartImagePipelineExecutionCommandError = function (
5108
5108
  case 0:
5109
5109
  _a = [__assign({}, output)];
5110
5110
  _c = {};
5111
- return [4, parseBody(output.body, context)];
5111
+ return [4, parseErrorBody(output.body, context)];
5112
5112
  case 1:
5113
5113
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5114
5114
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5191,7 +5191,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
5191
5191
  case 0:
5192
5192
  _a = [__assign({}, output)];
5193
5193
  _c = {};
5194
- return [4, parseBody(output.body, context)];
5194
+ return [4, parseErrorBody(output.body, context)];
5195
5195
  case 1:
5196
5196
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5197
5197
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5250,7 +5250,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
5250
5250
  case 0:
5251
5251
  _a = [__assign({}, output)];
5252
5252
  _c = {};
5253
- return [4, parseBody(output.body, context)];
5253
+ return [4, parseErrorBody(output.body, context)];
5254
5254
  case 1:
5255
5255
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5256
5256
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5320,7 +5320,7 @@ var deserializeAws_restJson1UpdateDistributionConfigurationCommandError = functi
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);
@@ -5414,7 +5414,7 @@ var deserializeAws_restJson1UpdateImagePipelineCommandError = function (output,
5414
5414
  case 0:
5415
5415
  _a = [__assign({}, output)];
5416
5416
  _c = {};
5417
- return [4, parseBody(output.body, context)];
5417
+ return [4, parseErrorBody(output.body, context)];
5418
5418
  case 1:
5419
5419
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5420
5420
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5504,7 +5504,7 @@ var deserializeAws_restJson1UpdateInfrastructureConfigurationCommandError = func
5504
5504
  case 0:
5505
5505
  _a = [__assign({}, output)];
5506
5506
  _c = {};
5507
- return [4, parseBody(output.body, context)];
5507
+ return [4, parseErrorBody(output.body, context)];
5508
5508
  case 1:
5509
5509
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5510
5510
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6902,6 +6902,19 @@ var parseBody = function (streamBody, context) {
6902
6902
  return {};
6903
6903
  });
6904
6904
  };
6905
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
6906
+ var value;
6907
+ var _a;
6908
+ return __generator(this, function (_b) {
6909
+ switch (_b.label) {
6910
+ case 0: return [4, parseBody(errorBody, context)];
6911
+ case 1:
6912
+ value = _b.sent();
6913
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
6914
+ return [2, value];
6915
+ }
6916
+ });
6917
+ }); };
6905
6918
  var loadRestJsonErrorCode = function (output, data) {
6906
6919
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
6907
6920
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-imagebuilder",
3
3
  "description": "AWS SDK for JavaScript Imagebuilder 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",