@aws-sdk/client-macie2 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-macie2
@@ -1474,7 +1474,7 @@ exports.deserializeAws_restJson1AcceptInvitationCommand = deserializeAws_restJso
1474
1474
  const deserializeAws_restJson1AcceptInvitationCommandError = async (output, context) => {
1475
1475
  const parsedOutput = {
1476
1476
  ...output,
1477
- body: await parseBody(output.body, context),
1477
+ body: await parseErrorBody(output.body, context),
1478
1478
  };
1479
1479
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1480
1480
  switch (errorCode) {
@@ -1529,7 +1529,7 @@ exports.deserializeAws_restJson1BatchGetCustomDataIdentifiersCommand = deseriali
1529
1529
  const deserializeAws_restJson1BatchGetCustomDataIdentifiersCommandError = async (output, context) => {
1530
1530
  const parsedOutput = {
1531
1531
  ...output,
1532
- body: await parseBody(output.body, context),
1532
+ body: await parseErrorBody(output.body, context),
1533
1533
  };
1534
1534
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1535
1535
  switch (errorCode) {
@@ -1584,7 +1584,7 @@ exports.deserializeAws_restJson1CreateAllowListCommand = deserializeAws_restJson
1584
1584
  const deserializeAws_restJson1CreateAllowListCommandError = async (output, context) => {
1585
1585
  const parsedOutput = {
1586
1586
  ...output,
1587
- body: await parseBody(output.body, context),
1587
+ body: await parseErrorBody(output.body, context),
1588
1588
  };
1589
1589
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1590
1590
  switch (errorCode) {
@@ -1639,7 +1639,7 @@ exports.deserializeAws_restJson1CreateClassificationJobCommand = deserializeAws_
1639
1639
  const deserializeAws_restJson1CreateClassificationJobCommandError = async (output, context) => {
1640
1640
  const parsedOutput = {
1641
1641
  ...output,
1642
- body: await parseBody(output.body, context),
1642
+ body: await parseErrorBody(output.body, context),
1643
1643
  };
1644
1644
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1645
1645
  switch (errorCode) {
@@ -1691,7 +1691,7 @@ exports.deserializeAws_restJson1CreateCustomDataIdentifierCommand = deserializeA
1691
1691
  const deserializeAws_restJson1CreateCustomDataIdentifierCommandError = async (output, context) => {
1692
1692
  const parsedOutput = {
1693
1693
  ...output,
1694
- body: await parseBody(output.body, context),
1694
+ body: await parseErrorBody(output.body, context),
1695
1695
  };
1696
1696
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1697
1697
  switch (errorCode) {
@@ -1746,7 +1746,7 @@ exports.deserializeAws_restJson1CreateFindingsFilterCommand = deserializeAws_res
1746
1746
  const deserializeAws_restJson1CreateFindingsFilterCommandError = async (output, context) => {
1747
1747
  const parsedOutput = {
1748
1748
  ...output,
1749
- body: await parseBody(output.body, context),
1749
+ body: await parseErrorBody(output.body, context),
1750
1750
  };
1751
1751
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1752
1752
  switch (errorCode) {
@@ -1798,7 +1798,7 @@ exports.deserializeAws_restJson1CreateInvitationsCommand = deserializeAws_restJs
1798
1798
  const deserializeAws_restJson1CreateInvitationsCommandError = async (output, context) => {
1799
1799
  const parsedOutput = {
1800
1800
  ...output,
1801
- body: await parseBody(output.body, context),
1801
+ body: await parseErrorBody(output.body, context),
1802
1802
  };
1803
1803
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1804
1804
  switch (errorCode) {
@@ -1850,7 +1850,7 @@ exports.deserializeAws_restJson1CreateMemberCommand = deserializeAws_restJson1Cr
1850
1850
  const deserializeAws_restJson1CreateMemberCommandError = async (output, context) => {
1851
1851
  const parsedOutput = {
1852
1852
  ...output,
1853
- body: await parseBody(output.body, context),
1853
+ body: await parseErrorBody(output.body, context),
1854
1854
  };
1855
1855
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1856
1856
  switch (errorCode) {
@@ -1899,7 +1899,7 @@ exports.deserializeAws_restJson1CreateSampleFindingsCommand = deserializeAws_res
1899
1899
  const deserializeAws_restJson1CreateSampleFindingsCommandError = async (output, context) => {
1900
1900
  const parsedOutput = {
1901
1901
  ...output,
1902
- body: await parseBody(output.body, context),
1902
+ body: await parseErrorBody(output.body, context),
1903
1903
  };
1904
1904
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1905
1905
  switch (errorCode) {
@@ -1951,7 +1951,7 @@ exports.deserializeAws_restJson1DeclineInvitationsCommand = deserializeAws_restJ
1951
1951
  const deserializeAws_restJson1DeclineInvitationsCommandError = async (output, context) => {
1952
1952
  const parsedOutput = {
1953
1953
  ...output,
1954
- body: await parseBody(output.body, context),
1954
+ body: await parseErrorBody(output.body, context),
1955
1955
  };
1956
1956
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1957
1957
  switch (errorCode) {
@@ -2000,7 +2000,7 @@ exports.deserializeAws_restJson1DeleteAllowListCommand = deserializeAws_restJson
2000
2000
  const deserializeAws_restJson1DeleteAllowListCommandError = async (output, context) => {
2001
2001
  const parsedOutput = {
2002
2002
  ...output,
2003
- body: await parseBody(output.body, context),
2003
+ body: await parseErrorBody(output.body, context),
2004
2004
  };
2005
2005
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2006
2006
  switch (errorCode) {
@@ -2043,7 +2043,7 @@ exports.deserializeAws_restJson1DeleteCustomDataIdentifierCommand = deserializeA
2043
2043
  const deserializeAws_restJson1DeleteCustomDataIdentifierCommandError = async (output, context) => {
2044
2044
  const parsedOutput = {
2045
2045
  ...output,
2046
- body: await parseBody(output.body, context),
2046
+ body: await parseErrorBody(output.body, context),
2047
2047
  };
2048
2048
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2049
2049
  switch (errorCode) {
@@ -2092,7 +2092,7 @@ exports.deserializeAws_restJson1DeleteFindingsFilterCommand = deserializeAws_res
2092
2092
  const deserializeAws_restJson1DeleteFindingsFilterCommandError = async (output, context) => {
2093
2093
  const parsedOutput = {
2094
2094
  ...output,
2095
- body: await parseBody(output.body, context),
2095
+ body: await parseErrorBody(output.body, context),
2096
2096
  };
2097
2097
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2098
2098
  switch (errorCode) {
@@ -2144,7 +2144,7 @@ exports.deserializeAws_restJson1DeleteInvitationsCommand = deserializeAws_restJs
2144
2144
  const deserializeAws_restJson1DeleteInvitationsCommandError = async (output, context) => {
2145
2145
  const parsedOutput = {
2146
2146
  ...output,
2147
- body: await parseBody(output.body, context),
2147
+ body: await parseErrorBody(output.body, context),
2148
2148
  };
2149
2149
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2150
2150
  switch (errorCode) {
@@ -2193,7 +2193,7 @@ exports.deserializeAws_restJson1DeleteMemberCommand = deserializeAws_restJson1De
2193
2193
  const deserializeAws_restJson1DeleteMemberCommandError = async (output, context) => {
2194
2194
  const parsedOutput = {
2195
2195
  ...output,
2196
- body: await parseBody(output.body, context),
2196
+ body: await parseErrorBody(output.body, context),
2197
2197
  };
2198
2198
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2199
2199
  switch (errorCode) {
@@ -2248,7 +2248,7 @@ exports.deserializeAws_restJson1DescribeBucketsCommand = deserializeAws_restJson
2248
2248
  const deserializeAws_restJson1DescribeBucketsCommandError = async (output, context) => {
2249
2249
  const parsedOutput = {
2250
2250
  ...output,
2251
- body: await parseBody(output.body, context),
2251
+ body: await parseErrorBody(output.body, context),
2252
2252
  };
2253
2253
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2254
2254
  switch (errorCode) {
@@ -2360,7 +2360,7 @@ exports.deserializeAws_restJson1DescribeClassificationJobCommand = deserializeAw
2360
2360
  const deserializeAws_restJson1DescribeClassificationJobCommandError = async (output, context) => {
2361
2361
  const parsedOutput = {
2362
2362
  ...output,
2363
- body: await parseBody(output.body, context),
2363
+ body: await parseErrorBody(output.body, context),
2364
2364
  };
2365
2365
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2366
2366
  switch (errorCode) {
@@ -2415,7 +2415,7 @@ exports.deserializeAws_restJson1DescribeOrganizationConfigurationCommand = deser
2415
2415
  const deserializeAws_restJson1DescribeOrganizationConfigurationCommandError = async (output, context) => {
2416
2416
  const parsedOutput = {
2417
2417
  ...output,
2418
- body: await parseBody(output.body, context),
2418
+ body: await parseErrorBody(output.body, context),
2419
2419
  };
2420
2420
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2421
2421
  switch (errorCode) {
@@ -2464,7 +2464,7 @@ exports.deserializeAws_restJson1DisableMacieCommand = deserializeAws_restJson1Di
2464
2464
  const deserializeAws_restJson1DisableMacieCommandError = async (output, context) => {
2465
2465
  const parsedOutput = {
2466
2466
  ...output,
2467
- body: await parseBody(output.body, context),
2467
+ body: await parseErrorBody(output.body, context),
2468
2468
  };
2469
2469
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2470
2470
  switch (errorCode) {
@@ -2513,7 +2513,7 @@ exports.deserializeAws_restJson1DisableOrganizationAdminAccountCommand = deseria
2513
2513
  const deserializeAws_restJson1DisableOrganizationAdminAccountCommandError = async (output, context) => {
2514
2514
  const parsedOutput = {
2515
2515
  ...output,
2516
- body: await parseBody(output.body, context),
2516
+ body: await parseErrorBody(output.body, context),
2517
2517
  };
2518
2518
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2519
2519
  switch (errorCode) {
@@ -2562,7 +2562,7 @@ exports.deserializeAws_restJson1DisassociateFromAdministratorAccountCommand = de
2562
2562
  const deserializeAws_restJson1DisassociateFromAdministratorAccountCommandError = async (output, context) => {
2563
2563
  const parsedOutput = {
2564
2564
  ...output,
2565
- body: await parseBody(output.body, context),
2565
+ body: await parseErrorBody(output.body, context),
2566
2566
  };
2567
2567
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2568
2568
  switch (errorCode) {
@@ -2611,7 +2611,7 @@ exports.deserializeAws_restJson1DisassociateFromMasterAccountCommand = deseriali
2611
2611
  const deserializeAws_restJson1DisassociateFromMasterAccountCommandError = async (output, context) => {
2612
2612
  const parsedOutput = {
2613
2613
  ...output,
2614
- body: await parseBody(output.body, context),
2614
+ body: await parseErrorBody(output.body, context),
2615
2615
  };
2616
2616
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2617
2617
  switch (errorCode) {
@@ -2660,7 +2660,7 @@ exports.deserializeAws_restJson1DisassociateMemberCommand = deserializeAws_restJ
2660
2660
  const deserializeAws_restJson1DisassociateMemberCommandError = async (output, context) => {
2661
2661
  const parsedOutput = {
2662
2662
  ...output,
2663
- body: await parseBody(output.body, context),
2663
+ body: await parseErrorBody(output.body, context),
2664
2664
  };
2665
2665
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2666
2666
  switch (errorCode) {
@@ -2709,7 +2709,7 @@ exports.deserializeAws_restJson1EnableMacieCommand = deserializeAws_restJson1Ena
2709
2709
  const deserializeAws_restJson1EnableMacieCommandError = async (output, context) => {
2710
2710
  const parsedOutput = {
2711
2711
  ...output,
2712
- body: await parseBody(output.body, context),
2712
+ body: await parseErrorBody(output.body, context),
2713
2713
  };
2714
2714
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2715
2715
  switch (errorCode) {
@@ -2758,7 +2758,7 @@ exports.deserializeAws_restJson1EnableOrganizationAdminAccountCommand = deserial
2758
2758
  const deserializeAws_restJson1EnableOrganizationAdminAccountCommandError = async (output, context) => {
2759
2759
  const parsedOutput = {
2760
2760
  ...output,
2761
- body: await parseBody(output.body, context),
2761
+ body: await parseErrorBody(output.body, context),
2762
2762
  };
2763
2763
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2764
2764
  switch (errorCode) {
@@ -2810,7 +2810,7 @@ exports.deserializeAws_restJson1GetAdministratorAccountCommand = deserializeAws_
2810
2810
  const deserializeAws_restJson1GetAdministratorAccountCommandError = async (output, context) => {
2811
2811
  const parsedOutput = {
2812
2812
  ...output,
2813
- body: await parseBody(output.body, context),
2813
+ body: await parseErrorBody(output.body, context),
2814
2814
  };
2815
2815
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2816
2816
  switch (errorCode) {
@@ -2886,7 +2886,7 @@ exports.deserializeAws_restJson1GetAllowListCommand = deserializeAws_restJson1Ge
2886
2886
  const deserializeAws_restJson1GetAllowListCommandError = async (output, context) => {
2887
2887
  const parsedOutput = {
2888
2888
  ...output,
2889
- body: await parseBody(output.body, context),
2889
+ body: await parseErrorBody(output.body, context),
2890
2890
  };
2891
2891
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2892
2892
  switch (errorCode) {
@@ -2969,7 +2969,7 @@ exports.deserializeAws_restJson1GetBucketStatisticsCommand = deserializeAws_rest
2969
2969
  const deserializeAws_restJson1GetBucketStatisticsCommandError = async (output, context) => {
2970
2970
  const parsedOutput = {
2971
2971
  ...output,
2972
- body: await parseBody(output.body, context),
2972
+ body: await parseErrorBody(output.body, context),
2973
2973
  };
2974
2974
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2975
2975
  switch (errorCode) {
@@ -3021,7 +3021,7 @@ exports.deserializeAws_restJson1GetClassificationExportConfigurationCommand = de
3021
3021
  const deserializeAws_restJson1GetClassificationExportConfigurationCommandError = async (output, context) => {
3022
3022
  const parsedOutput = {
3023
3023
  ...output,
3024
- body: await parseBody(output.body, context),
3024
+ body: await parseErrorBody(output.body, context),
3025
3025
  };
3026
3026
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3027
3027
  switch (errorCode) {
@@ -3106,7 +3106,7 @@ exports.deserializeAws_restJson1GetCustomDataIdentifierCommand = deserializeAws_
3106
3106
  const deserializeAws_restJson1GetCustomDataIdentifierCommandError = async (output, context) => {
3107
3107
  const parsedOutput = {
3108
3108
  ...output,
3109
- body: await parseBody(output.body, context),
3109
+ body: await parseErrorBody(output.body, context),
3110
3110
  };
3111
3111
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3112
3112
  switch (errorCode) {
@@ -3158,7 +3158,7 @@ exports.deserializeAws_restJson1GetFindingsCommand = deserializeAws_restJson1Get
3158
3158
  const deserializeAws_restJson1GetFindingsCommandError = async (output, context) => {
3159
3159
  const parsedOutput = {
3160
3160
  ...output,
3161
- body: await parseBody(output.body, context),
3161
+ body: await parseErrorBody(output.body, context),
3162
3162
  };
3163
3163
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3164
3164
  switch (errorCode) {
@@ -3231,7 +3231,7 @@ exports.deserializeAws_restJson1GetFindingsFilterCommand = deserializeAws_restJs
3231
3231
  const deserializeAws_restJson1GetFindingsFilterCommandError = async (output, context) => {
3232
3232
  const parsedOutput = {
3233
3233
  ...output,
3234
- body: await parseBody(output.body, context),
3234
+ body: await parseErrorBody(output.body, context),
3235
3235
  };
3236
3236
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3237
3237
  switch (errorCode) {
@@ -3283,7 +3283,7 @@ exports.deserializeAws_restJson1GetFindingsPublicationConfigurationCommand = des
3283
3283
  const deserializeAws_restJson1GetFindingsPublicationConfigurationCommandError = async (output, context) => {
3284
3284
  const parsedOutput = {
3285
3285
  ...output,
3286
- body: await parseBody(output.body, context),
3286
+ body: await parseErrorBody(output.body, context),
3287
3287
  };
3288
3288
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3289
3289
  switch (errorCode) {
@@ -3335,7 +3335,7 @@ exports.deserializeAws_restJson1GetFindingStatisticsCommand = deserializeAws_res
3335
3335
  const deserializeAws_restJson1GetFindingStatisticsCommandError = async (output, context) => {
3336
3336
  const parsedOutput = {
3337
3337
  ...output,
3338
- body: await parseBody(output.body, context),
3338
+ body: await parseErrorBody(output.body, context),
3339
3339
  };
3340
3340
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3341
3341
  switch (errorCode) {
@@ -3387,7 +3387,7 @@ exports.deserializeAws_restJson1GetInvitationsCountCommand = deserializeAws_rest
3387
3387
  const deserializeAws_restJson1GetInvitationsCountCommandError = async (output, context) => {
3388
3388
  const parsedOutput = {
3389
3389
  ...output,
3390
- body: await parseBody(output.body, context),
3390
+ body: await parseErrorBody(output.body, context),
3391
3391
  };
3392
3392
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3393
3393
  switch (errorCode) {
@@ -3451,7 +3451,7 @@ exports.deserializeAws_restJson1GetMacieSessionCommand = deserializeAws_restJson
3451
3451
  const deserializeAws_restJson1GetMacieSessionCommandError = async (output, context) => {
3452
3452
  const parsedOutput = {
3453
3453
  ...output,
3454
- body: await parseBody(output.body, context),
3454
+ body: await parseErrorBody(output.body, context),
3455
3455
  };
3456
3456
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3457
3457
  switch (errorCode) {
@@ -3503,7 +3503,7 @@ exports.deserializeAws_restJson1GetMasterAccountCommand = deserializeAws_restJso
3503
3503
  const deserializeAws_restJson1GetMasterAccountCommandError = async (output, context) => {
3504
3504
  const parsedOutput = {
3505
3505
  ...output,
3506
- body: await parseBody(output.body, context),
3506
+ body: await parseErrorBody(output.body, context),
3507
3507
  };
3508
3508
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3509
3509
  switch (errorCode) {
@@ -3579,7 +3579,7 @@ exports.deserializeAws_restJson1GetMemberCommand = deserializeAws_restJson1GetMe
3579
3579
  const deserializeAws_restJson1GetMemberCommandError = async (output, context) => {
3580
3580
  const parsedOutput = {
3581
3581
  ...output,
3582
- body: await parseBody(output.body, context),
3582
+ body: await parseErrorBody(output.body, context),
3583
3583
  };
3584
3584
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3585
3585
  switch (errorCode) {
@@ -3631,7 +3631,7 @@ exports.deserializeAws_restJson1GetRevealConfigurationCommand = deserializeAws_r
3631
3631
  const deserializeAws_restJson1GetRevealConfigurationCommandError = async (output, context) => {
3632
3632
  const parsedOutput = {
3633
3633
  ...output,
3634
- body: await parseBody(output.body, context),
3634
+ body: await parseErrorBody(output.body, context),
3635
3635
  };
3636
3636
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3637
3637
  switch (errorCode) {
@@ -3680,7 +3680,7 @@ exports.deserializeAws_restJson1GetSensitiveDataOccurrencesCommand = deserialize
3680
3680
  const deserializeAws_restJson1GetSensitiveDataOccurrencesCommandError = async (output, context) => {
3681
3681
  const parsedOutput = {
3682
3682
  ...output,
3683
- body: await parseBody(output.body, context),
3683
+ body: await parseErrorBody(output.body, context),
3684
3684
  };
3685
3685
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3686
3686
  switch (errorCode) {
@@ -3732,7 +3732,7 @@ exports.deserializeAws_restJson1GetSensitiveDataOccurrencesAvailabilityCommand =
3732
3732
  const deserializeAws_restJson1GetSensitiveDataOccurrencesAvailabilityCommandError = async (output, context) => {
3733
3733
  const parsedOutput = {
3734
3734
  ...output,
3735
- body: await parseBody(output.body, context),
3735
+ body: await parseErrorBody(output.body, context),
3736
3736
  };
3737
3737
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3738
3738
  switch (errorCode) {
@@ -3781,7 +3781,7 @@ exports.deserializeAws_restJson1GetUsageStatisticsCommand = deserializeAws_restJ
3781
3781
  const deserializeAws_restJson1GetUsageStatisticsCommandError = async (output, context) => {
3782
3782
  const parsedOutput = {
3783
3783
  ...output,
3784
- body: await parseBody(output.body, context),
3784
+ body: await parseErrorBody(output.body, context),
3785
3785
  };
3786
3786
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3787
3787
  switch (errorCode) {
@@ -3836,7 +3836,7 @@ exports.deserializeAws_restJson1GetUsageTotalsCommand = deserializeAws_restJson1
3836
3836
  const deserializeAws_restJson1GetUsageTotalsCommandError = async (output, context) => {
3837
3837
  const parsedOutput = {
3838
3838
  ...output,
3839
- body: await parseBody(output.body, context),
3839
+ body: await parseErrorBody(output.body, context),
3840
3840
  };
3841
3841
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3842
3842
  switch (errorCode) {
@@ -3891,7 +3891,7 @@ exports.deserializeAws_restJson1ListAllowListsCommand = deserializeAws_restJson1
3891
3891
  const deserializeAws_restJson1ListAllowListsCommandError = async (output, context) => {
3892
3892
  const parsedOutput = {
3893
3893
  ...output,
3894
- body: await parseBody(output.body, context),
3894
+ body: await parseErrorBody(output.body, context),
3895
3895
  };
3896
3896
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3897
3897
  switch (errorCode) {
@@ -3937,7 +3937,7 @@ exports.deserializeAws_restJson1ListClassificationJobsCommand = deserializeAws_r
3937
3937
  const deserializeAws_restJson1ListClassificationJobsCommandError = async (output, context) => {
3938
3938
  const parsedOutput = {
3939
3939
  ...output,
3940
- body: await parseBody(output.body, context),
3940
+ body: await parseErrorBody(output.body, context),
3941
3941
  };
3942
3942
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3943
3943
  switch (errorCode) {
@@ -3992,7 +3992,7 @@ exports.deserializeAws_restJson1ListCustomDataIdentifiersCommand = deserializeAw
3992
3992
  const deserializeAws_restJson1ListCustomDataIdentifiersCommandError = async (output, context) => {
3993
3993
  const parsedOutput = {
3994
3994
  ...output,
3995
- body: await parseBody(output.body, context),
3995
+ body: await parseErrorBody(output.body, context),
3996
3996
  };
3997
3997
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3998
3998
  switch (errorCode) {
@@ -4047,7 +4047,7 @@ exports.deserializeAws_restJson1ListFindingsCommand = deserializeAws_restJson1Li
4047
4047
  const deserializeAws_restJson1ListFindingsCommandError = async (output, context) => {
4048
4048
  const parsedOutput = {
4049
4049
  ...output,
4050
- body: await parseBody(output.body, context),
4050
+ body: await parseErrorBody(output.body, context),
4051
4051
  };
4052
4052
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4053
4053
  switch (errorCode) {
@@ -4102,7 +4102,7 @@ exports.deserializeAws_restJson1ListFindingsFiltersCommand = deserializeAws_rest
4102
4102
  const deserializeAws_restJson1ListFindingsFiltersCommandError = async (output, context) => {
4103
4103
  const parsedOutput = {
4104
4104
  ...output,
4105
- body: await parseBody(output.body, context),
4105
+ body: await parseErrorBody(output.body, context),
4106
4106
  };
4107
4107
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4108
4108
  switch (errorCode) {
@@ -4157,7 +4157,7 @@ exports.deserializeAws_restJson1ListInvitationsCommand = deserializeAws_restJson
4157
4157
  const deserializeAws_restJson1ListInvitationsCommandError = async (output, context) => {
4158
4158
  const parsedOutput = {
4159
4159
  ...output,
4160
- body: await parseBody(output.body, context),
4160
+ body: await parseErrorBody(output.body, context),
4161
4161
  };
4162
4162
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4163
4163
  switch (errorCode) {
@@ -4212,7 +4212,7 @@ exports.deserializeAws_restJson1ListManagedDataIdentifiersCommand = deserializeA
4212
4212
  const deserializeAws_restJson1ListManagedDataIdentifiersCommandError = async (output, context) => {
4213
4213
  const parsedOutput = {
4214
4214
  ...output,
4215
- body: await parseBody(output.body, context),
4215
+ body: await parseErrorBody(output.body, context),
4216
4216
  };
4217
4217
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4218
4218
  const parsedBody = parsedOutput.body;
@@ -4243,7 +4243,7 @@ exports.deserializeAws_restJson1ListMembersCommand = deserializeAws_restJson1Lis
4243
4243
  const deserializeAws_restJson1ListMembersCommandError = async (output, context) => {
4244
4244
  const parsedOutput = {
4245
4245
  ...output,
4246
- body: await parseBody(output.body, context),
4246
+ body: await parseErrorBody(output.body, context),
4247
4247
  };
4248
4248
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4249
4249
  switch (errorCode) {
@@ -4298,7 +4298,7 @@ exports.deserializeAws_restJson1ListOrganizationAdminAccountsCommand = deseriali
4298
4298
  const deserializeAws_restJson1ListOrganizationAdminAccountsCommandError = async (output, context) => {
4299
4299
  const parsedOutput = {
4300
4300
  ...output,
4301
- body: await parseBody(output.body, context),
4301
+ body: await parseErrorBody(output.body, context),
4302
4302
  };
4303
4303
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4304
4304
  switch (errorCode) {
@@ -4350,7 +4350,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
4350
4350
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
4351
4351
  const parsedOutput = {
4352
4352
  ...output,
4353
- body: await parseBody(output.body, context),
4353
+ body: await parseErrorBody(output.body, context),
4354
4354
  };
4355
4355
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4356
4356
  const parsedBody = parsedOutput.body;
@@ -4378,7 +4378,7 @@ exports.deserializeAws_restJson1PutClassificationExportConfigurationCommand = de
4378
4378
  const deserializeAws_restJson1PutClassificationExportConfigurationCommandError = async (output, context) => {
4379
4379
  const parsedOutput = {
4380
4380
  ...output,
4381
- body: await parseBody(output.body, context),
4381
+ body: await parseErrorBody(output.body, context),
4382
4382
  };
4383
4383
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4384
4384
  switch (errorCode) {
@@ -4427,7 +4427,7 @@ exports.deserializeAws_restJson1PutFindingsPublicationConfigurationCommand = des
4427
4427
  const deserializeAws_restJson1PutFindingsPublicationConfigurationCommandError = async (output, context) => {
4428
4428
  const parsedOutput = {
4429
4429
  ...output,
4430
- body: await parseBody(output.body, context),
4430
+ body: await parseErrorBody(output.body, context),
4431
4431
  };
4432
4432
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4433
4433
  switch (errorCode) {
@@ -4482,7 +4482,7 @@ exports.deserializeAws_restJson1SearchResourcesCommand = deserializeAws_restJson
4482
4482
  const deserializeAws_restJson1SearchResourcesCommandError = async (output, context) => {
4483
4483
  const parsedOutput = {
4484
4484
  ...output,
4485
- body: await parseBody(output.body, context),
4485
+ body: await parseErrorBody(output.body, context),
4486
4486
  };
4487
4487
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4488
4488
  switch (errorCode) {
@@ -4531,7 +4531,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
4531
4531
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
4532
4532
  const parsedOutput = {
4533
4533
  ...output,
4534
- body: await parseBody(output.body, context),
4534
+ body: await parseErrorBody(output.body, context),
4535
4535
  };
4536
4536
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4537
4537
  const parsedBody = parsedOutput.body;
@@ -4559,7 +4559,7 @@ exports.deserializeAws_restJson1TestCustomDataIdentifierCommand = deserializeAws
4559
4559
  const deserializeAws_restJson1TestCustomDataIdentifierCommandError = async (output, context) => {
4560
4560
  const parsedOutput = {
4561
4561
  ...output,
4562
- body: await parseBody(output.body, context),
4562
+ body: await parseErrorBody(output.body, context),
4563
4563
  };
4564
4564
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4565
4565
  switch (errorCode) {
@@ -4608,7 +4608,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
4608
4608
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
4609
4609
  const parsedOutput = {
4610
4610
  ...output,
4611
- body: await parseBody(output.body, context),
4611
+ body: await parseErrorBody(output.body, context),
4612
4612
  };
4613
4613
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4614
4614
  const parsedBody = parsedOutput.body;
@@ -4639,7 +4639,7 @@ exports.deserializeAws_restJson1UpdateAllowListCommand = deserializeAws_restJson
4639
4639
  const deserializeAws_restJson1UpdateAllowListCommandError = async (output, context) => {
4640
4640
  const parsedOutput = {
4641
4641
  ...output,
4642
- body: await parseBody(output.body, context),
4642
+ body: await parseErrorBody(output.body, context),
4643
4643
  };
4644
4644
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4645
4645
  switch (errorCode) {
@@ -4682,7 +4682,7 @@ exports.deserializeAws_restJson1UpdateClassificationJobCommand = deserializeAws_
4682
4682
  const deserializeAws_restJson1UpdateClassificationJobCommandError = async (output, context) => {
4683
4683
  const parsedOutput = {
4684
4684
  ...output,
4685
- body: await parseBody(output.body, context),
4685
+ body: await parseErrorBody(output.body, context),
4686
4686
  };
4687
4687
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4688
4688
  switch (errorCode) {
@@ -4737,7 +4737,7 @@ exports.deserializeAws_restJson1UpdateFindingsFilterCommand = deserializeAws_res
4737
4737
  const deserializeAws_restJson1UpdateFindingsFilterCommandError = async (output, context) => {
4738
4738
  const parsedOutput = {
4739
4739
  ...output,
4740
- body: await parseBody(output.body, context),
4740
+ body: await parseErrorBody(output.body, context),
4741
4741
  };
4742
4742
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4743
4743
  switch (errorCode) {
@@ -4786,7 +4786,7 @@ exports.deserializeAws_restJson1UpdateMacieSessionCommand = deserializeAws_restJ
4786
4786
  const deserializeAws_restJson1UpdateMacieSessionCommandError = async (output, context) => {
4787
4787
  const parsedOutput = {
4788
4788
  ...output,
4789
- body: await parseBody(output.body, context),
4789
+ body: await parseErrorBody(output.body, context),
4790
4790
  };
4791
4791
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4792
4792
  switch (errorCode) {
@@ -4835,7 +4835,7 @@ exports.deserializeAws_restJson1UpdateMemberSessionCommand = deserializeAws_rest
4835
4835
  const deserializeAws_restJson1UpdateMemberSessionCommandError = async (output, context) => {
4836
4836
  const parsedOutput = {
4837
4837
  ...output,
4838
- body: await parseBody(output.body, context),
4838
+ body: await parseErrorBody(output.body, context),
4839
4839
  };
4840
4840
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4841
4841
  switch (errorCode) {
@@ -4884,7 +4884,7 @@ exports.deserializeAws_restJson1UpdateOrganizationConfigurationCommand = deseria
4884
4884
  const deserializeAws_restJson1UpdateOrganizationConfigurationCommandError = async (output, context) => {
4885
4885
  const parsedOutput = {
4886
4886
  ...output,
4887
- body: await parseBody(output.body, context),
4887
+ body: await parseErrorBody(output.body, context),
4888
4888
  };
4889
4889
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4890
4890
  switch (errorCode) {
@@ -4936,7 +4936,7 @@ exports.deserializeAws_restJson1UpdateRevealConfigurationCommand = deserializeAw
4936
4936
  const deserializeAws_restJson1UpdateRevealConfigurationCommandError = async (output, context) => {
4937
4937
  const parsedOutput = {
4938
4938
  ...output,
4939
- body: await parseBody(output.body, context),
4939
+ body: await parseErrorBody(output.body, context),
4940
4940
  };
4941
4941
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4942
4942
  switch (errorCode) {
@@ -6811,6 +6811,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
6811
6811
  }
6812
6812
  return {};
6813
6813
  });
6814
+ const parseErrorBody = async (errorBody, context) => {
6815
+ var _a;
6816
+ const value = await parseBody(errorBody, context);
6817
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
6818
+ return value;
6819
+ };
6814
6820
  const loadRestJsonErrorCode = (output, data) => {
6815
6821
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
6816
6822
  const sanitizeErrorCode = (rawValue) => {
@@ -1672,7 +1672,7 @@ var deserializeAws_restJson1AcceptInvitationCommandError = function (output, con
1672
1672
  case 0:
1673
1673
  _a = [__assign({}, output)];
1674
1674
  _c = {};
1675
- return [4, parseBody(output.body, context)];
1675
+ return [4, parseErrorBody(output.body, context)];
1676
1676
  case 1:
1677
1677
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1678
1678
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1755,7 +1755,7 @@ var deserializeAws_restJson1BatchGetCustomDataIdentifiersCommandError = function
1755
1755
  case 0:
1756
1756
  _a = [__assign({}, output)];
1757
1757
  _c = {};
1758
- return [4, parseBody(output.body, context)];
1758
+ return [4, parseErrorBody(output.body, context)];
1759
1759
  case 1:
1760
1760
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1761
1761
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1838,7 +1838,7 @@ var deserializeAws_restJson1CreateAllowListCommandError = function (output, cont
1838
1838
  case 0:
1839
1839
  _a = [__assign({}, output)];
1840
1840
  _c = {};
1841
- return [4, parseBody(output.body, context)];
1841
+ return [4, parseErrorBody(output.body, context)];
1842
1842
  case 1:
1843
1843
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1844
1844
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1921,7 +1921,7 @@ var deserializeAws_restJson1CreateClassificationJobCommandError = function (outp
1921
1921
  case 0:
1922
1922
  _a = [__assign({}, output)];
1923
1923
  _c = {};
1924
- return [4, parseBody(output.body, context)];
1924
+ return [4, parseErrorBody(output.body, context)];
1925
1925
  case 1:
1926
1926
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1927
1927
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2001,7 +2001,7 @@ var deserializeAws_restJson1CreateCustomDataIdentifierCommandError = function (o
2001
2001
  case 0:
2002
2002
  _a = [__assign({}, output)];
2003
2003
  _c = {};
2004
- return [4, parseBody(output.body, context)];
2004
+ return [4, parseErrorBody(output.body, context)];
2005
2005
  case 1:
2006
2006
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2007
2007
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2084,7 +2084,7 @@ var deserializeAws_restJson1CreateFindingsFilterCommandError = function (output,
2084
2084
  case 0:
2085
2085
  _a = [__assign({}, output)];
2086
2086
  _c = {};
2087
- return [4, parseBody(output.body, context)];
2087
+ return [4, parseErrorBody(output.body, context)];
2088
2088
  case 1:
2089
2089
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2090
2090
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2164,7 +2164,7 @@ var deserializeAws_restJson1CreateInvitationsCommandError = function (output, co
2164
2164
  case 0:
2165
2165
  _a = [__assign({}, output)];
2166
2166
  _c = {};
2167
- return [4, parseBody(output.body, context)];
2167
+ return [4, parseErrorBody(output.body, context)];
2168
2168
  case 1:
2169
2169
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2170
2170
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2244,7 +2244,7 @@ var deserializeAws_restJson1CreateMemberCommandError = function (output, context
2244
2244
  case 0:
2245
2245
  _a = [__assign({}, output)];
2246
2246
  _c = {};
2247
- return [4, parseBody(output.body, context)];
2247
+ return [4, parseErrorBody(output.body, context)];
2248
2248
  case 1:
2249
2249
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2250
2250
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2319,7 +2319,7 @@ var deserializeAws_restJson1CreateSampleFindingsCommandError = function (output,
2319
2319
  case 0:
2320
2320
  _a = [__assign({}, output)];
2321
2321
  _c = {};
2322
- return [4, parseBody(output.body, context)];
2322
+ return [4, parseErrorBody(output.body, context)];
2323
2323
  case 1:
2324
2324
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2325
2325
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2399,7 +2399,7 @@ var deserializeAws_restJson1DeclineInvitationsCommandError = function (output, c
2399
2399
  case 0:
2400
2400
  _a = [__assign({}, output)];
2401
2401
  _c = {};
2402
- return [4, parseBody(output.body, context)];
2402
+ return [4, parseErrorBody(output.body, context)];
2403
2403
  case 1:
2404
2404
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2405
2405
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2474,7 +2474,7 @@ var deserializeAws_restJson1DeleteAllowListCommandError = function (output, cont
2474
2474
  case 0:
2475
2475
  _a = [__assign({}, output)];
2476
2476
  _c = {};
2477
- return [4, parseBody(output.body, context)];
2477
+ return [4, parseErrorBody(output.body, context)];
2478
2478
  case 1:
2479
2479
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2480
2480
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2541,7 +2541,7 @@ var deserializeAws_restJson1DeleteCustomDataIdentifierCommandError = function (o
2541
2541
  case 0:
2542
2542
  _a = [__assign({}, output)];
2543
2543
  _c = {};
2544
- return [4, parseBody(output.body, context)];
2544
+ return [4, parseErrorBody(output.body, context)];
2545
2545
  case 1:
2546
2546
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2547
2547
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2616,7 +2616,7 @@ var deserializeAws_restJson1DeleteFindingsFilterCommandError = function (output,
2616
2616
  case 0:
2617
2617
  _a = [__assign({}, output)];
2618
2618
  _c = {};
2619
- return [4, parseBody(output.body, context)];
2619
+ return [4, parseErrorBody(output.body, context)];
2620
2620
  case 1:
2621
2621
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2622
2622
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2696,7 +2696,7 @@ var deserializeAws_restJson1DeleteInvitationsCommandError = function (output, co
2696
2696
  case 0:
2697
2697
  _a = [__assign({}, output)];
2698
2698
  _c = {};
2699
- return [4, parseBody(output.body, context)];
2699
+ return [4, parseErrorBody(output.body, context)];
2700
2700
  case 1:
2701
2701
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2702
2702
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2771,7 +2771,7 @@ var deserializeAws_restJson1DeleteMemberCommandError = function (output, context
2771
2771
  case 0:
2772
2772
  _a = [__assign({}, output)];
2773
2773
  _c = {};
2774
- return [4, parseBody(output.body, context)];
2774
+ return [4, parseErrorBody(output.body, context)];
2775
2775
  case 1:
2776
2776
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2777
2777
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2854,7 +2854,7 @@ var deserializeAws_restJson1DescribeBucketsCommandError = function (output, cont
2854
2854
  case 0:
2855
2855
  _a = [__assign({}, output)];
2856
2856
  _c = {};
2857
- return [4, parseBody(output.body, context)];
2857
+ return [4, parseErrorBody(output.body, context)];
2858
2858
  case 1:
2859
2859
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2860
2860
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2994,7 +2994,7 @@ var deserializeAws_restJson1DescribeClassificationJobCommandError = function (ou
2994
2994
  case 0:
2995
2995
  _a = [__assign({}, output)];
2996
2996
  _c = {};
2997
- return [4, parseBody(output.body, context)];
2997
+ return [4, parseErrorBody(output.body, context)];
2998
2998
  case 1:
2999
2999
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3000
3000
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3077,7 +3077,7 @@ var deserializeAws_restJson1DescribeOrganizationConfigurationCommandError = func
3077
3077
  case 0:
3078
3078
  _a = [__assign({}, output)];
3079
3079
  _c = {};
3080
- return [4, parseBody(output.body, context)];
3080
+ return [4, parseErrorBody(output.body, context)];
3081
3081
  case 1:
3082
3082
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3083
3083
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3152,7 +3152,7 @@ var deserializeAws_restJson1DisableMacieCommandError = function (output, context
3152
3152
  case 0:
3153
3153
  _a = [__assign({}, output)];
3154
3154
  _c = {};
3155
- return [4, parseBody(output.body, context)];
3155
+ return [4, parseErrorBody(output.body, context)];
3156
3156
  case 1:
3157
3157
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3158
3158
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3227,7 +3227,7 @@ var deserializeAws_restJson1DisableOrganizationAdminAccountCommandError = functi
3227
3227
  case 0:
3228
3228
  _a = [__assign({}, output)];
3229
3229
  _c = {};
3230
- return [4, parseBody(output.body, context)];
3230
+ return [4, parseErrorBody(output.body, context)];
3231
3231
  case 1:
3232
3232
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3233
3233
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3302,7 +3302,7 @@ var deserializeAws_restJson1DisassociateFromAdministratorAccountCommandError = f
3302
3302
  case 0:
3303
3303
  _a = [__assign({}, output)];
3304
3304
  _c = {};
3305
- return [4, parseBody(output.body, context)];
3305
+ return [4, parseErrorBody(output.body, context)];
3306
3306
  case 1:
3307
3307
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3308
3308
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3377,7 +3377,7 @@ var deserializeAws_restJson1DisassociateFromMasterAccountCommandError = function
3377
3377
  case 0:
3378
3378
  _a = [__assign({}, output)];
3379
3379
  _c = {};
3380
- return [4, parseBody(output.body, context)];
3380
+ return [4, parseErrorBody(output.body, context)];
3381
3381
  case 1:
3382
3382
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3383
3383
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3452,7 +3452,7 @@ var deserializeAws_restJson1DisassociateMemberCommandError = function (output, c
3452
3452
  case 0:
3453
3453
  _a = [__assign({}, output)];
3454
3454
  _c = {};
3455
- return [4, parseBody(output.body, context)];
3455
+ return [4, parseErrorBody(output.body, context)];
3456
3456
  case 1:
3457
3457
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3458
3458
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3527,7 +3527,7 @@ var deserializeAws_restJson1EnableMacieCommandError = function (output, context)
3527
3527
  case 0:
3528
3528
  _a = [__assign({}, output)];
3529
3529
  _c = {};
3530
- return [4, parseBody(output.body, context)];
3530
+ return [4, parseErrorBody(output.body, context)];
3531
3531
  case 1:
3532
3532
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3533
3533
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3602,7 +3602,7 @@ var deserializeAws_restJson1EnableOrganizationAdminAccountCommandError = functio
3602
3602
  case 0:
3603
3603
  _a = [__assign({}, output)];
3604
3604
  _c = {};
3605
- return [4, parseBody(output.body, context)];
3605
+ return [4, parseErrorBody(output.body, context)];
3606
3606
  case 1:
3607
3607
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3608
3608
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3682,7 +3682,7 @@ var deserializeAws_restJson1GetAdministratorAccountCommandError = function (outp
3682
3682
  case 0:
3683
3683
  _a = [__assign({}, output)];
3684
3684
  _c = {};
3685
- return [4, parseBody(output.body, context)];
3685
+ return [4, parseErrorBody(output.body, context)];
3686
3686
  case 1:
3687
3687
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3688
3688
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3786,7 +3786,7 @@ var deserializeAws_restJson1GetAllowListCommandError = function (output, context
3786
3786
  case 0:
3787
3787
  _a = [__assign({}, output)];
3788
3788
  _c = {};
3789
- return [4, parseBody(output.body, context)];
3789
+ return [4, parseErrorBody(output.body, context)];
3790
3790
  case 1:
3791
3791
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3792
3792
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3895,7 +3895,7 @@ var deserializeAws_restJson1GetBucketStatisticsCommandError = function (output,
3895
3895
  case 0:
3896
3896
  _a = [__assign({}, output)];
3897
3897
  _c = {};
3898
- return [4, parseBody(output.body, context)];
3898
+ return [4, parseErrorBody(output.body, context)];
3899
3899
  case 1:
3900
3900
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3901
3901
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3975,7 +3975,7 @@ var deserializeAws_restJson1GetClassificationExportConfigurationCommandError = f
3975
3975
  case 0:
3976
3976
  _a = [__assign({}, output)];
3977
3977
  _c = {};
3978
- return [4, parseBody(output.body, context)];
3978
+ return [4, parseErrorBody(output.body, context)];
3979
3979
  case 1:
3980
3980
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3981
3981
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4088,7 +4088,7 @@ var deserializeAws_restJson1GetCustomDataIdentifierCommandError = function (outp
4088
4088
  case 0:
4089
4089
  _a = [__assign({}, output)];
4090
4090
  _c = {};
4091
- return [4, parseBody(output.body, context)];
4091
+ return [4, parseErrorBody(output.body, context)];
4092
4092
  case 1:
4093
4093
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4094
4094
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4168,7 +4168,7 @@ var deserializeAws_restJson1GetFindingsCommandError = function (output, context)
4168
4168
  case 0:
4169
4169
  _a = [__assign({}, output)];
4170
4170
  _c = {};
4171
- return [4, parseBody(output.body, context)];
4171
+ return [4, parseErrorBody(output.body, context)];
4172
4172
  case 1:
4173
4173
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4174
4174
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4269,7 +4269,7 @@ var deserializeAws_restJson1GetFindingsFilterCommandError = function (output, co
4269
4269
  case 0:
4270
4270
  _a = [__assign({}, output)];
4271
4271
  _c = {};
4272
- return [4, parseBody(output.body, context)];
4272
+ return [4, parseErrorBody(output.body, context)];
4273
4273
  case 1:
4274
4274
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4275
4275
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4349,7 +4349,7 @@ var deserializeAws_restJson1GetFindingsPublicationConfigurationCommandError = fu
4349
4349
  case 0:
4350
4350
  _a = [__assign({}, output)];
4351
4351
  _c = {};
4352
- return [4, parseBody(output.body, context)];
4352
+ return [4, parseErrorBody(output.body, context)];
4353
4353
  case 1:
4354
4354
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4355
4355
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4429,7 +4429,7 @@ var deserializeAws_restJson1GetFindingStatisticsCommandError = function (output,
4429
4429
  case 0:
4430
4430
  _a = [__assign({}, output)];
4431
4431
  _c = {};
4432
- return [4, parseBody(output.body, context)];
4432
+ return [4, parseErrorBody(output.body, context)];
4433
4433
  case 1:
4434
4434
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4435
4435
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4509,7 +4509,7 @@ var deserializeAws_restJson1GetInvitationsCountCommandError = function (output,
4509
4509
  case 0:
4510
4510
  _a = [__assign({}, output)];
4511
4511
  _c = {};
4512
- return [4, parseBody(output.body, context)];
4512
+ return [4, parseErrorBody(output.body, context)];
4513
4513
  case 1:
4514
4514
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4515
4515
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4601,7 +4601,7 @@ var deserializeAws_restJson1GetMacieSessionCommandError = function (output, cont
4601
4601
  case 0:
4602
4602
  _a = [__assign({}, output)];
4603
4603
  _c = {};
4604
- return [4, parseBody(output.body, context)];
4604
+ return [4, parseErrorBody(output.body, context)];
4605
4605
  case 1:
4606
4606
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4607
4607
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4681,7 +4681,7 @@ var deserializeAws_restJson1GetMasterAccountCommandError = function (output, con
4681
4681
  case 0:
4682
4682
  _a = [__assign({}, output)];
4683
4683
  _c = {};
4684
- return [4, parseBody(output.body, context)];
4684
+ return [4, parseErrorBody(output.body, context)];
4685
4685
  case 1:
4686
4686
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4687
4687
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4785,7 +4785,7 @@ var deserializeAws_restJson1GetMemberCommandError = function (output, context) {
4785
4785
  case 0:
4786
4786
  _a = [__assign({}, output)];
4787
4787
  _c = {};
4788
- return [4, parseBody(output.body, context)];
4788
+ return [4, parseErrorBody(output.body, context)];
4789
4789
  case 1:
4790
4790
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4791
4791
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4865,7 +4865,7 @@ var deserializeAws_restJson1GetRevealConfigurationCommandError = function (outpu
4865
4865
  case 0:
4866
4866
  _a = [__assign({}, output)];
4867
4867
  _c = {};
4868
- return [4, parseBody(output.body, context)];
4868
+ return [4, parseErrorBody(output.body, context)];
4869
4869
  case 1:
4870
4870
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4871
4871
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4939,7 +4939,7 @@ var deserializeAws_restJson1GetSensitiveDataOccurrencesCommandError = function (
4939
4939
  case 0:
4940
4940
  _a = [__assign({}, output)];
4941
4941
  _c = {};
4942
- return [4, parseBody(output.body, context)];
4942
+ return [4, parseErrorBody(output.body, context)];
4943
4943
  case 1:
4944
4944
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4945
4945
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5018,7 +5018,7 @@ var deserializeAws_restJson1GetSensitiveDataOccurrencesAvailabilityCommandError
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);
@@ -5092,7 +5092,7 @@ var deserializeAws_restJson1GetUsageStatisticsCommandError = function (output, c
5092
5092
  case 0:
5093
5093
  _a = [__assign({}, output)];
5094
5094
  _c = {};
5095
- return [4, parseBody(output.body, context)];
5095
+ return [4, parseErrorBody(output.body, context)];
5096
5096
  case 1:
5097
5097
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5098
5098
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5175,7 +5175,7 @@ var deserializeAws_restJson1GetUsageTotalsCommandError = function (output, conte
5175
5175
  case 0:
5176
5176
  _a = [__assign({}, output)];
5177
5177
  _c = {};
5178
- return [4, parseBody(output.body, context)];
5178
+ return [4, parseErrorBody(output.body, context)];
5179
5179
  case 1:
5180
5180
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5181
5181
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5258,7 +5258,7 @@ var deserializeAws_restJson1ListAllowListsCommandError = function (output, conte
5258
5258
  case 0:
5259
5259
  _a = [__assign({}, output)];
5260
5260
  _c = {};
5261
- return [4, parseBody(output.body, context)];
5261
+ return [4, parseErrorBody(output.body, context)];
5262
5262
  case 1:
5263
5263
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5264
5264
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5329,7 +5329,7 @@ var deserializeAws_restJson1ListClassificationJobsCommandError = function (outpu
5329
5329
  case 0:
5330
5330
  _a = [__assign({}, output)];
5331
5331
  _c = {};
5332
- return [4, parseBody(output.body, context)];
5332
+ return [4, parseErrorBody(output.body, context)];
5333
5333
  case 1:
5334
5334
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5335
5335
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5412,7 +5412,7 @@ var deserializeAws_restJson1ListCustomDataIdentifiersCommandError = function (ou
5412
5412
  case 0:
5413
5413
  _a = [__assign({}, output)];
5414
5414
  _c = {};
5415
- return [4, parseBody(output.body, context)];
5415
+ return [4, parseErrorBody(output.body, context)];
5416
5416
  case 1:
5417
5417
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5418
5418
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5495,7 +5495,7 @@ var deserializeAws_restJson1ListFindingsCommandError = function (output, context
5495
5495
  case 0:
5496
5496
  _a = [__assign({}, output)];
5497
5497
  _c = {};
5498
- return [4, parseBody(output.body, context)];
5498
+ return [4, parseErrorBody(output.body, context)];
5499
5499
  case 1:
5500
5500
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5501
5501
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5578,7 +5578,7 @@ var deserializeAws_restJson1ListFindingsFiltersCommandError = function (output,
5578
5578
  case 0:
5579
5579
  _a = [__assign({}, output)];
5580
5580
  _c = {};
5581
- return [4, parseBody(output.body, context)];
5581
+ return [4, parseErrorBody(output.body, context)];
5582
5582
  case 1:
5583
5583
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5584
5584
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5661,7 +5661,7 @@ var deserializeAws_restJson1ListInvitationsCommandError = function (output, cont
5661
5661
  case 0:
5662
5662
  _a = [__assign({}, output)];
5663
5663
  _c = {};
5664
- return [4, parseBody(output.body, context)];
5664
+ return [4, parseErrorBody(output.body, context)];
5665
5665
  case 1:
5666
5666
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5667
5667
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5744,7 +5744,7 @@ var deserializeAws_restJson1ListManagedDataIdentifiersCommandError = function (o
5744
5744
  case 0:
5745
5745
  _a = [__assign({}, output)];
5746
5746
  _b = {};
5747
- return [4, parseBody(output.body, context)];
5747
+ return [4, parseErrorBody(output.body, context)];
5748
5748
  case 1:
5749
5749
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
5750
5750
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5793,7 +5793,7 @@ var deserializeAws_restJson1ListMembersCommandError = function (output, context)
5793
5793
  case 0:
5794
5794
  _a = [__assign({}, output)];
5795
5795
  _c = {};
5796
- return [4, parseBody(output.body, context)];
5796
+ return [4, parseErrorBody(output.body, context)];
5797
5797
  case 1:
5798
5798
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5799
5799
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5876,7 +5876,7 @@ var deserializeAws_restJson1ListOrganizationAdminAccountsCommandError = function
5876
5876
  case 0:
5877
5877
  _a = [__assign({}, output)];
5878
5878
  _c = {};
5879
- return [4, parseBody(output.body, context)];
5879
+ return [4, parseErrorBody(output.body, context)];
5880
5880
  case 1:
5881
5881
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5882
5882
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5956,7 +5956,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
5956
5956
  case 0:
5957
5957
  _a = [__assign({}, output)];
5958
5958
  _b = {};
5959
- return [4, parseBody(output.body, context)];
5959
+ return [4, parseErrorBody(output.body, context)];
5960
5960
  case 1:
5961
5961
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
5962
5962
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6002,7 +6002,7 @@ var deserializeAws_restJson1PutClassificationExportConfigurationCommandError = f
6002
6002
  case 0:
6003
6003
  _a = [__assign({}, output)];
6004
6004
  _c = {};
6005
- return [4, parseBody(output.body, context)];
6005
+ return [4, parseErrorBody(output.body, context)];
6006
6006
  case 1:
6007
6007
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6008
6008
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6077,7 +6077,7 @@ var deserializeAws_restJson1PutFindingsPublicationConfigurationCommandError = fu
6077
6077
  case 0:
6078
6078
  _a = [__assign({}, output)];
6079
6079
  _c = {};
6080
- return [4, parseBody(output.body, context)];
6080
+ return [4, parseErrorBody(output.body, context)];
6081
6081
  case 1:
6082
6082
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6083
6083
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6160,7 +6160,7 @@ var deserializeAws_restJson1SearchResourcesCommandError = function (output, cont
6160
6160
  case 0:
6161
6161
  _a = [__assign({}, output)];
6162
6162
  _c = {};
6163
- return [4, parseBody(output.body, context)];
6163
+ return [4, parseErrorBody(output.body, context)];
6164
6164
  case 1:
6165
6165
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6166
6166
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6235,7 +6235,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
6235
6235
  case 0:
6236
6236
  _a = [__assign({}, output)];
6237
6237
  _b = {};
6238
- return [4, parseBody(output.body, context)];
6238
+ return [4, parseErrorBody(output.body, context)];
6239
6239
  case 1:
6240
6240
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
6241
6241
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6281,7 +6281,7 @@ var deserializeAws_restJson1TestCustomDataIdentifierCommandError = function (out
6281
6281
  case 0:
6282
6282
  _a = [__assign({}, output)];
6283
6283
  _c = {};
6284
- return [4, parseBody(output.body, context)];
6284
+ return [4, parseErrorBody(output.body, context)];
6285
6285
  case 1:
6286
6286
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6287
6287
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6356,7 +6356,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
6356
6356
  case 0:
6357
6357
  _a = [__assign({}, output)];
6358
6358
  _b = {};
6359
- return [4, parseBody(output.body, context)];
6359
+ return [4, parseErrorBody(output.body, context)];
6360
6360
  case 1:
6361
6361
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
6362
6362
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6405,7 +6405,7 @@ var deserializeAws_restJson1UpdateAllowListCommandError = function (output, cont
6405
6405
  case 0:
6406
6406
  _a = [__assign({}, output)];
6407
6407
  _c = {};
6408
- return [4, parseBody(output.body, context)];
6408
+ return [4, parseErrorBody(output.body, context)];
6409
6409
  case 1:
6410
6410
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6411
6411
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6472,7 +6472,7 @@ var deserializeAws_restJson1UpdateClassificationJobCommandError = function (outp
6472
6472
  case 0:
6473
6473
  _a = [__assign({}, output)];
6474
6474
  _c = {};
6475
- return [4, parseBody(output.body, context)];
6475
+ return [4, parseErrorBody(output.body, context)];
6476
6476
  case 1:
6477
6477
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6478
6478
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6555,7 +6555,7 @@ var deserializeAws_restJson1UpdateFindingsFilterCommandError = function (output,
6555
6555
  case 0:
6556
6556
  _a = [__assign({}, output)];
6557
6557
  _c = {};
6558
- return [4, parseBody(output.body, context)];
6558
+ return [4, parseErrorBody(output.body, context)];
6559
6559
  case 1:
6560
6560
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6561
6561
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6630,7 +6630,7 @@ var deserializeAws_restJson1UpdateMacieSessionCommandError = function (output, c
6630
6630
  case 0:
6631
6631
  _a = [__assign({}, output)];
6632
6632
  _c = {};
6633
- return [4, parseBody(output.body, context)];
6633
+ return [4, parseErrorBody(output.body, context)];
6634
6634
  case 1:
6635
6635
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6636
6636
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6705,7 +6705,7 @@ var deserializeAws_restJson1UpdateMemberSessionCommandError = function (output,
6705
6705
  case 0:
6706
6706
  _a = [__assign({}, output)];
6707
6707
  _c = {};
6708
- return [4, parseBody(output.body, context)];
6708
+ return [4, parseErrorBody(output.body, context)];
6709
6709
  case 1:
6710
6710
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6711
6711
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6780,7 +6780,7 @@ var deserializeAws_restJson1UpdateOrganizationConfigurationCommandError = functi
6780
6780
  case 0:
6781
6781
  _a = [__assign({}, output)];
6782
6782
  _c = {};
6783
- return [4, parseBody(output.body, context)];
6783
+ return [4, parseErrorBody(output.body, context)];
6784
6784
  case 1:
6785
6785
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6786
6786
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6860,7 +6860,7 @@ var deserializeAws_restJson1UpdateRevealConfigurationCommandError = function (ou
6860
6860
  case 0:
6861
6861
  _a = [__assign({}, output)];
6862
6862
  _c = {};
6863
- return [4, parseBody(output.body, context)];
6863
+ return [4, parseErrorBody(output.body, context)];
6864
6864
  case 1:
6865
6865
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6866
6866
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -8605,6 +8605,19 @@ var parseBody = function (streamBody, context) {
8605
8605
  return {};
8606
8606
  });
8607
8607
  };
8608
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
8609
+ var value;
8610
+ var _a;
8611
+ return __generator(this, function (_b) {
8612
+ switch (_b.label) {
8613
+ case 0: return [4, parseBody(errorBody, context)];
8614
+ case 1:
8615
+ value = _b.sent();
8616
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
8617
+ return [2, value];
8618
+ }
8619
+ });
8620
+ }); };
8608
8621
  var loadRestJsonErrorCode = function (output, data) {
8609
8622
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
8610
8623
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-macie2",
3
3
  "description": "AWS SDK for JavaScript Macie2 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",