@aws-sdk/client-chime-sdk-messaging 3.179.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,26 @@
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
+
18
+ # [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
19
+
20
+ **Note:** Version bump only for package @aws-sdk/client-chime-sdk-messaging
21
+
22
+
23
+
24
+
25
+
6
26
  # [3.179.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.178.0...v3.179.0) (2022-09-26)
7
27
 
8
28
  **Note:** Version bump only for package @aws-sdk/client-chime-sdk-messaging
@@ -1171,7 +1171,7 @@ exports.deserializeAws_restJson1AssociateChannelFlowCommand = deserializeAws_res
1171
1171
  const deserializeAws_restJson1AssociateChannelFlowCommandError = async (output, context) => {
1172
1172
  const parsedOutput = {
1173
1173
  ...output,
1174
- body: await parseBody(output.body, context),
1174
+ body: await parseErrorBody(output.body, context),
1175
1175
  };
1176
1176
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1177
1177
  switch (errorCode) {
@@ -1229,7 +1229,7 @@ exports.deserializeAws_restJson1BatchCreateChannelMembershipCommand = deserializ
1229
1229
  const deserializeAws_restJson1BatchCreateChannelMembershipCommandError = async (output, context) => {
1230
1230
  const parsedOutput = {
1231
1231
  ...output,
1232
- body: await parseBody(output.body, context),
1232
+ body: await parseErrorBody(output.body, context),
1233
1233
  };
1234
1234
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1235
1235
  switch (errorCode) {
@@ -1287,7 +1287,7 @@ exports.deserializeAws_restJson1ChannelFlowCallbackCommand = deserializeAws_rest
1287
1287
  const deserializeAws_restJson1ChannelFlowCallbackCommandError = async (output, context) => {
1288
1288
  const parsedOutput = {
1289
1289
  ...output,
1290
- body: await parseBody(output.body, context),
1290
+ body: await parseErrorBody(output.body, context),
1291
1291
  };
1292
1292
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1293
1293
  switch (errorCode) {
@@ -1339,7 +1339,7 @@ exports.deserializeAws_restJson1CreateChannelCommand = deserializeAws_restJson1C
1339
1339
  const deserializeAws_restJson1CreateChannelCommandError = async (output, context) => {
1340
1340
  const parsedOutput = {
1341
1341
  ...output,
1342
- body: await parseBody(output.body, context),
1342
+ body: await parseErrorBody(output.body, context),
1343
1343
  };
1344
1344
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1345
1345
  switch (errorCode) {
@@ -1397,7 +1397,7 @@ exports.deserializeAws_restJson1CreateChannelBanCommand = deserializeAws_restJso
1397
1397
  const deserializeAws_restJson1CreateChannelBanCommandError = async (output, context) => {
1398
1398
  const parsedOutput = {
1399
1399
  ...output,
1400
- body: await parseBody(output.body, context),
1400
+ body: await parseErrorBody(output.body, context),
1401
1401
  };
1402
1402
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1403
1403
  switch (errorCode) {
@@ -1452,7 +1452,7 @@ exports.deserializeAws_restJson1CreateChannelFlowCommand = deserializeAws_restJs
1452
1452
  const deserializeAws_restJson1CreateChannelFlowCommandError = async (output, context) => {
1453
1453
  const parsedOutput = {
1454
1454
  ...output,
1455
- body: await parseBody(output.body, context),
1455
+ body: await parseErrorBody(output.body, context),
1456
1456
  };
1457
1457
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1458
1458
  switch (errorCode) {
@@ -1513,7 +1513,7 @@ exports.deserializeAws_restJson1CreateChannelMembershipCommand = deserializeAws_
1513
1513
  const deserializeAws_restJson1CreateChannelMembershipCommandError = async (output, context) => {
1514
1514
  const parsedOutput = {
1515
1515
  ...output,
1516
- body: await parseBody(output.body, context),
1516
+ body: await parseErrorBody(output.body, context),
1517
1517
  };
1518
1518
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1519
1519
  switch (errorCode) {
@@ -1574,7 +1574,7 @@ exports.deserializeAws_restJson1CreateChannelModeratorCommand = deserializeAws_r
1574
1574
  const deserializeAws_restJson1CreateChannelModeratorCommandError = async (output, context) => {
1575
1575
  const parsedOutput = {
1576
1576
  ...output,
1577
- body: await parseBody(output.body, context),
1577
+ body: await parseErrorBody(output.body, context),
1578
1578
  };
1579
1579
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1580
1580
  switch (errorCode) {
@@ -1626,7 +1626,7 @@ exports.deserializeAws_restJson1DeleteChannelCommand = deserializeAws_restJson1D
1626
1626
  const deserializeAws_restJson1DeleteChannelCommandError = async (output, context) => {
1627
1627
  const parsedOutput = {
1628
1628
  ...output,
1629
- body: await parseBody(output.body, context),
1629
+ body: await parseErrorBody(output.body, context),
1630
1630
  };
1631
1631
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1632
1632
  switch (errorCode) {
@@ -1672,7 +1672,7 @@ exports.deserializeAws_restJson1DeleteChannelBanCommand = deserializeAws_restJso
1672
1672
  const deserializeAws_restJson1DeleteChannelBanCommandError = async (output, context) => {
1673
1673
  const parsedOutput = {
1674
1674
  ...output,
1675
- body: await parseBody(output.body, context),
1675
+ body: await parseErrorBody(output.body, context),
1676
1676
  };
1677
1677
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1678
1678
  switch (errorCode) {
@@ -1718,7 +1718,7 @@ exports.deserializeAws_restJson1DeleteChannelFlowCommand = deserializeAws_restJs
1718
1718
  const deserializeAws_restJson1DeleteChannelFlowCommandError = async (output, context) => {
1719
1719
  const parsedOutput = {
1720
1720
  ...output,
1721
- body: await parseBody(output.body, context),
1721
+ body: await parseErrorBody(output.body, context),
1722
1722
  };
1723
1723
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1724
1724
  switch (errorCode) {
@@ -1767,7 +1767,7 @@ exports.deserializeAws_restJson1DeleteChannelMembershipCommand = deserializeAws_
1767
1767
  const deserializeAws_restJson1DeleteChannelMembershipCommandError = async (output, context) => {
1768
1768
  const parsedOutput = {
1769
1769
  ...output,
1770
- body: await parseBody(output.body, context),
1770
+ body: await parseErrorBody(output.body, context),
1771
1771
  };
1772
1772
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1773
1773
  switch (errorCode) {
@@ -1816,7 +1816,7 @@ exports.deserializeAws_restJson1DeleteChannelMessageCommand = deserializeAws_res
1816
1816
  const deserializeAws_restJson1DeleteChannelMessageCommandError = async (output, context) => {
1817
1817
  const parsedOutput = {
1818
1818
  ...output,
1819
- body: await parseBody(output.body, context),
1819
+ body: await parseErrorBody(output.body, context),
1820
1820
  };
1821
1821
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1822
1822
  switch (errorCode) {
@@ -1862,7 +1862,7 @@ exports.deserializeAws_restJson1DeleteChannelModeratorCommand = deserializeAws_r
1862
1862
  const deserializeAws_restJson1DeleteChannelModeratorCommandError = async (output, context) => {
1863
1863
  const parsedOutput = {
1864
1864
  ...output,
1865
- body: await parseBody(output.body, context),
1865
+ body: await parseErrorBody(output.body, context),
1866
1866
  };
1867
1867
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1868
1868
  switch (errorCode) {
@@ -1911,7 +1911,7 @@ exports.deserializeAws_restJson1DescribeChannelCommand = deserializeAws_restJson
1911
1911
  const deserializeAws_restJson1DescribeChannelCommandError = async (output, context) => {
1912
1912
  const parsedOutput = {
1913
1913
  ...output,
1914
- body: await parseBody(output.body, context),
1914
+ body: await parseErrorBody(output.body, context),
1915
1915
  };
1916
1916
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1917
1917
  switch (errorCode) {
@@ -1960,7 +1960,7 @@ exports.deserializeAws_restJson1DescribeChannelBanCommand = deserializeAws_restJ
1960
1960
  const deserializeAws_restJson1DescribeChannelBanCommandError = async (output, context) => {
1961
1961
  const parsedOutput = {
1962
1962
  ...output,
1963
- body: await parseBody(output.body, context),
1963
+ body: await parseErrorBody(output.body, context),
1964
1964
  };
1965
1965
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1966
1966
  switch (errorCode) {
@@ -2012,7 +2012,7 @@ exports.deserializeAws_restJson1DescribeChannelFlowCommand = deserializeAws_rest
2012
2012
  const deserializeAws_restJson1DescribeChannelFlowCommandError = async (output, context) => {
2013
2013
  const parsedOutput = {
2014
2014
  ...output,
2015
- body: await parseBody(output.body, context),
2015
+ body: await parseErrorBody(output.body, context),
2016
2016
  };
2017
2017
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2018
2018
  switch (errorCode) {
@@ -2061,7 +2061,7 @@ exports.deserializeAws_restJson1DescribeChannelMembershipCommand = deserializeAw
2061
2061
  const deserializeAws_restJson1DescribeChannelMembershipCommandError = async (output, context) => {
2062
2062
  const parsedOutput = {
2063
2063
  ...output,
2064
- body: await parseBody(output.body, context),
2064
+ body: await parseErrorBody(output.body, context),
2065
2065
  };
2066
2066
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2067
2067
  switch (errorCode) {
@@ -2113,7 +2113,7 @@ exports.deserializeAws_restJson1DescribeChannelMembershipForAppInstanceUserComma
2113
2113
  const deserializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommandError = async (output, context) => {
2114
2114
  const parsedOutput = {
2115
2115
  ...output,
2116
- body: await parseBody(output.body, context),
2116
+ body: await parseErrorBody(output.body, context),
2117
2117
  };
2118
2118
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2119
2119
  switch (errorCode) {
@@ -2162,7 +2162,7 @@ exports.deserializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand
2162
2162
  const deserializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommandError = async (output, context) => {
2163
2163
  const parsedOutput = {
2164
2164
  ...output,
2165
- body: await parseBody(output.body, context),
2165
+ body: await parseErrorBody(output.body, context),
2166
2166
  };
2167
2167
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2168
2168
  switch (errorCode) {
@@ -2211,7 +2211,7 @@ exports.deserializeAws_restJson1DescribeChannelModeratorCommand = deserializeAws
2211
2211
  const deserializeAws_restJson1DescribeChannelModeratorCommandError = async (output, context) => {
2212
2212
  const parsedOutput = {
2213
2213
  ...output,
2214
- body: await parseBody(output.body, context),
2214
+ body: await parseErrorBody(output.body, context),
2215
2215
  };
2216
2216
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2217
2217
  switch (errorCode) {
@@ -2260,7 +2260,7 @@ exports.deserializeAws_restJson1DisassociateChannelFlowCommand = deserializeAws_
2260
2260
  const deserializeAws_restJson1DisassociateChannelFlowCommandError = async (output, context) => {
2261
2261
  const parsedOutput = {
2262
2262
  ...output,
2263
- body: await parseBody(output.body, context),
2263
+ body: await parseErrorBody(output.body, context),
2264
2264
  };
2265
2265
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2266
2266
  switch (errorCode) {
@@ -2321,7 +2321,7 @@ exports.deserializeAws_restJson1GetChannelMembershipPreferencesCommand = deseria
2321
2321
  const deserializeAws_restJson1GetChannelMembershipPreferencesCommandError = async (output, context) => {
2322
2322
  const parsedOutput = {
2323
2323
  ...output,
2324
- body: await parseBody(output.body, context),
2324
+ body: await parseErrorBody(output.body, context),
2325
2325
  };
2326
2326
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2327
2327
  switch (errorCode) {
@@ -2370,7 +2370,7 @@ exports.deserializeAws_restJson1GetChannelMessageCommand = deserializeAws_restJs
2370
2370
  const deserializeAws_restJson1GetChannelMessageCommandError = async (output, context) => {
2371
2371
  const parsedOutput = {
2372
2372
  ...output,
2373
- body: await parseBody(output.body, context),
2373
+ body: await parseErrorBody(output.body, context),
2374
2374
  };
2375
2375
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2376
2376
  switch (errorCode) {
@@ -2422,7 +2422,7 @@ exports.deserializeAws_restJson1GetChannelMessageStatusCommand = deserializeAws_
2422
2422
  const deserializeAws_restJson1GetChannelMessageStatusCommandError = async (output, context) => {
2423
2423
  const parsedOutput = {
2424
2424
  ...output,
2425
- body: await parseBody(output.body, context),
2425
+ body: await parseErrorBody(output.body, context),
2426
2426
  };
2427
2427
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2428
2428
  switch (errorCode) {
@@ -2471,7 +2471,7 @@ exports.deserializeAws_restJson1GetMessagingSessionEndpointCommand = deserialize
2471
2471
  const deserializeAws_restJson1GetMessagingSessionEndpointCommandError = async (output, context) => {
2472
2472
  const parsedOutput = {
2473
2473
  ...output,
2474
- body: await parseBody(output.body, context),
2474
+ body: await parseErrorBody(output.body, context),
2475
2475
  };
2476
2476
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2477
2477
  switch (errorCode) {
@@ -2523,7 +2523,7 @@ exports.deserializeAws_restJson1ListChannelBansCommand = deserializeAws_restJson
2523
2523
  const deserializeAws_restJson1ListChannelBansCommandError = async (output, context) => {
2524
2524
  const parsedOutput = {
2525
2525
  ...output,
2526
- body: await parseBody(output.body, context),
2526
+ body: await parseErrorBody(output.body, context),
2527
2527
  };
2528
2528
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2529
2529
  switch (errorCode) {
@@ -2575,7 +2575,7 @@ exports.deserializeAws_restJson1ListChannelFlowsCommand = deserializeAws_restJso
2575
2575
  const deserializeAws_restJson1ListChannelFlowsCommandError = async (output, context) => {
2576
2576
  const parsedOutput = {
2577
2577
  ...output,
2578
- body: await parseBody(output.body, context),
2578
+ body: await parseErrorBody(output.body, context),
2579
2579
  };
2580
2580
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2581
2581
  switch (errorCode) {
@@ -2630,7 +2630,7 @@ exports.deserializeAws_restJson1ListChannelMembershipsCommand = deserializeAws_r
2630
2630
  const deserializeAws_restJson1ListChannelMembershipsCommandError = async (output, context) => {
2631
2631
  const parsedOutput = {
2632
2632
  ...output,
2633
- body: await parseBody(output.body, context),
2633
+ body: await parseErrorBody(output.body, context),
2634
2634
  };
2635
2635
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2636
2636
  switch (errorCode) {
@@ -2682,7 +2682,7 @@ exports.deserializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand
2682
2682
  const deserializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommandError = async (output, context) => {
2683
2683
  const parsedOutput = {
2684
2684
  ...output,
2685
- body: await parseBody(output.body, context),
2685
+ body: await parseErrorBody(output.body, context),
2686
2686
  };
2687
2687
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2688
2688
  switch (errorCode) {
@@ -2740,7 +2740,7 @@ exports.deserializeAws_restJson1ListChannelMessagesCommand = deserializeAws_rest
2740
2740
  const deserializeAws_restJson1ListChannelMessagesCommandError = async (output, context) => {
2741
2741
  const parsedOutput = {
2742
2742
  ...output,
2743
- body: await parseBody(output.body, context),
2743
+ body: await parseErrorBody(output.body, context),
2744
2744
  };
2745
2745
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2746
2746
  switch (errorCode) {
@@ -2795,7 +2795,7 @@ exports.deserializeAws_restJson1ListChannelModeratorsCommand = deserializeAws_re
2795
2795
  const deserializeAws_restJson1ListChannelModeratorsCommandError = async (output, context) => {
2796
2796
  const parsedOutput = {
2797
2797
  ...output,
2798
- body: await parseBody(output.body, context),
2798
+ body: await parseErrorBody(output.body, context),
2799
2799
  };
2800
2800
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2801
2801
  switch (errorCode) {
@@ -2847,7 +2847,7 @@ exports.deserializeAws_restJson1ListChannelsCommand = deserializeAws_restJson1Li
2847
2847
  const deserializeAws_restJson1ListChannelsCommandError = 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) {
@@ -2899,7 +2899,7 @@ exports.deserializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommand = d
2899
2899
  const deserializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommandError = async (output, context) => {
2900
2900
  const parsedOutput = {
2901
2901
  ...output,
2902
- body: await parseBody(output.body, context),
2902
+ body: await parseErrorBody(output.body, context),
2903
2903
  };
2904
2904
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2905
2905
  switch (errorCode) {
@@ -2951,7 +2951,7 @@ exports.deserializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand =
2951
2951
  const deserializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommandError = 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) {
@@ -3006,7 +3006,7 @@ exports.deserializeAws_restJson1ListSubChannelsCommand = deserializeAws_restJson
3006
3006
  const deserializeAws_restJson1ListSubChannelsCommandError = async (output, context) => {
3007
3007
  const parsedOutput = {
3008
3008
  ...output,
3009
- body: await parseBody(output.body, context),
3009
+ body: await parseErrorBody(output.body, context),
3010
3010
  };
3011
3011
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3012
3012
  switch (errorCode) {
@@ -3055,7 +3055,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
3055
3055
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
3056
3056
  const parsedOutput = {
3057
3057
  ...output,
3058
- body: await parseBody(output.body, context),
3058
+ body: await parseErrorBody(output.body, context),
3059
3059
  };
3060
3060
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3061
3061
  switch (errorCode) {
@@ -3110,7 +3110,7 @@ exports.deserializeAws_restJson1PutChannelMembershipPreferencesCommand = deseria
3110
3110
  const deserializeAws_restJson1PutChannelMembershipPreferencesCommandError = async (output, context) => {
3111
3111
  const parsedOutput = {
3112
3112
  ...output,
3113
- body: await parseBody(output.body, context),
3113
+ body: await parseErrorBody(output.body, context),
3114
3114
  };
3115
3115
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3116
3116
  switch (errorCode) {
@@ -3168,7 +3168,7 @@ exports.deserializeAws_restJson1RedactChannelMessageCommand = deserializeAws_res
3168
3168
  const deserializeAws_restJson1RedactChannelMessageCommandError = async (output, context) => {
3169
3169
  const parsedOutput = {
3170
3170
  ...output,
3171
- body: await parseBody(output.body, context),
3171
+ body: await parseErrorBody(output.body, context),
3172
3172
  };
3173
3173
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3174
3174
  switch (errorCode) {
@@ -3223,7 +3223,7 @@ exports.deserializeAws_restJson1SearchChannelsCommand = deserializeAws_restJson1
3223
3223
  const deserializeAws_restJson1SearchChannelsCommandError = async (output, context) => {
3224
3224
  const parsedOutput = {
3225
3225
  ...output,
3226
- body: await parseBody(output.body, context),
3226
+ body: await parseErrorBody(output.body, context),
3227
3227
  };
3228
3228
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3229
3229
  switch (errorCode) {
@@ -3281,7 +3281,7 @@ exports.deserializeAws_restJson1SendChannelMessageCommand = deserializeAws_restJ
3281
3281
  const deserializeAws_restJson1SendChannelMessageCommandError = async (output, context) => {
3282
3282
  const parsedOutput = {
3283
3283
  ...output,
3284
- body: await parseBody(output.body, context),
3284
+ body: await parseErrorBody(output.body, context),
3285
3285
  };
3286
3286
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3287
3287
  switch (errorCode) {
@@ -3330,7 +3330,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
3330
3330
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
3331
3331
  const parsedOutput = {
3332
3332
  ...output,
3333
- body: await parseBody(output.body, context),
3333
+ body: await parseErrorBody(output.body, context),
3334
3334
  };
3335
3335
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3336
3336
  switch (errorCode) {
@@ -3379,7 +3379,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
3379
3379
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
3380
3380
  const parsedOutput = {
3381
3381
  ...output,
3382
- body: await parseBody(output.body, context),
3382
+ body: await parseErrorBody(output.body, context),
3383
3383
  };
3384
3384
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3385
3385
  switch (errorCode) {
@@ -3428,7 +3428,7 @@ exports.deserializeAws_restJson1UpdateChannelCommand = deserializeAws_restJson1U
3428
3428
  const deserializeAws_restJson1UpdateChannelCommandError = async (output, context) => {
3429
3429
  const parsedOutput = {
3430
3430
  ...output,
3431
- body: await parseBody(output.body, context),
3431
+ body: await parseErrorBody(output.body, context),
3432
3432
  };
3433
3433
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3434
3434
  switch (errorCode) {
@@ -3480,7 +3480,7 @@ exports.deserializeAws_restJson1UpdateChannelFlowCommand = deserializeAws_restJs
3480
3480
  const deserializeAws_restJson1UpdateChannelFlowCommandError = async (output, context) => {
3481
3481
  const parsedOutput = {
3482
3482
  ...output,
3483
- body: await parseBody(output.body, context),
3483
+ body: await parseErrorBody(output.body, context),
3484
3484
  };
3485
3485
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3486
3486
  switch (errorCode) {
@@ -3541,7 +3541,7 @@ exports.deserializeAws_restJson1UpdateChannelMessageCommand = deserializeAws_res
3541
3541
  const deserializeAws_restJson1UpdateChannelMessageCommandError = async (output, context) => {
3542
3542
  const parsedOutput = {
3543
3543
  ...output,
3544
- body: await parseBody(output.body, context),
3544
+ body: await parseErrorBody(output.body, context),
3545
3545
  };
3546
3546
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3547
3547
  switch (errorCode) {
@@ -3596,7 +3596,7 @@ exports.deserializeAws_restJson1UpdateChannelReadMarkerCommand = deserializeAws_
3596
3596
  const deserializeAws_restJson1UpdateChannelReadMarkerCommandError = async (output, context) => {
3597
3597
  const parsedOutput = {
3598
3598
  ...output,
3599
- body: await parseBody(output.body, context),
3599
+ body: await parseErrorBody(output.body, context),
3600
3600
  };
3601
3601
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3602
3602
  switch (errorCode) {
@@ -4412,6 +4412,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
4412
4412
  }
4413
4413
  return {};
4414
4414
  });
4415
+ const parseErrorBody = async (errorBody, context) => {
4416
+ var _a;
4417
+ const value = await parseBody(errorBody, context);
4418
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
4419
+ return value;
4420
+ };
4415
4421
  const loadRestJsonErrorCode = (output, data) => {
4416
4422
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
4417
4423
  const sanitizeErrorCode = (rawValue) => {
@@ -1345,7 +1345,7 @@ var deserializeAws_restJson1AssociateChannelFlowCommandError = function (output,
1345
1345
  case 0:
1346
1346
  _a = [__assign({}, output)];
1347
1347
  _c = {};
1348
- return [4, parseBody(output.body, context)];
1348
+ return [4, parseErrorBody(output.body, context)];
1349
1349
  case 1:
1350
1350
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1351
1351
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1432,7 +1432,7 @@ var deserializeAws_restJson1BatchCreateChannelMembershipCommandError = function
1432
1432
  case 0:
1433
1433
  _a = [__assign({}, output)];
1434
1434
  _c = {};
1435
- return [4, parseBody(output.body, context)];
1435
+ return [4, parseErrorBody(output.body, context)];
1436
1436
  case 1:
1437
1437
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1438
1438
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1519,7 +1519,7 @@ var deserializeAws_restJson1ChannelFlowCallbackCommandError = function (output,
1519
1519
  case 0:
1520
1520
  _a = [__assign({}, output)];
1521
1521
  _c = {};
1522
- return [4, parseBody(output.body, context)];
1522
+ return [4, parseErrorBody(output.body, context)];
1523
1523
  case 1:
1524
1524
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1525
1525
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1599,7 +1599,7 @@ var deserializeAws_restJson1CreateChannelCommandError = function (output, contex
1599
1599
  case 0:
1600
1600
  _a = [__assign({}, output)];
1601
1601
  _c = {};
1602
- return [4, parseBody(output.body, context)];
1602
+ return [4, parseErrorBody(output.body, context)];
1603
1603
  case 1:
1604
1604
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1605
1605
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1686,7 +1686,7 @@ var deserializeAws_restJson1CreateChannelBanCommandError = function (output, con
1686
1686
  case 0:
1687
1687
  _a = [__assign({}, output)];
1688
1688
  _c = {};
1689
- return [4, parseBody(output.body, context)];
1689
+ return [4, parseErrorBody(output.body, context)];
1690
1690
  case 1:
1691
1691
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1692
1692
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1770,7 +1770,7 @@ var deserializeAws_restJson1CreateChannelFlowCommandError = function (output, co
1770
1770
  case 0:
1771
1771
  _a = [__assign({}, output)];
1772
1772
  _c = {};
1773
- return [4, parseBody(output.body, context)];
1773
+ return [4, parseErrorBody(output.body, context)];
1774
1774
  case 1:
1775
1775
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1776
1776
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1860,7 +1860,7 @@ var deserializeAws_restJson1CreateChannelMembershipCommandError = function (outp
1860
1860
  case 0:
1861
1861
  _a = [__assign({}, output)];
1862
1862
  _c = {};
1863
- return [4, parseBody(output.body, context)];
1863
+ return [4, parseErrorBody(output.body, context)];
1864
1864
  case 1:
1865
1865
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1866
1866
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1951,7 +1951,7 @@ var deserializeAws_restJson1CreateChannelModeratorCommandError = function (outpu
1951
1951
  case 0:
1952
1952
  _a = [__assign({}, output)];
1953
1953
  _c = {};
1954
- return [4, parseBody(output.body, context)];
1954
+ return [4, parseErrorBody(output.body, context)];
1955
1955
  case 1:
1956
1956
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1957
1957
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2030,7 +2030,7 @@ var deserializeAws_restJson1DeleteChannelCommandError = function (output, contex
2030
2030
  case 0:
2031
2031
  _a = [__assign({}, output)];
2032
2032
  _c = {};
2033
- return [4, parseBody(output.body, context)];
2033
+ return [4, parseErrorBody(output.body, context)];
2034
2034
  case 1:
2035
2035
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2036
2036
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2101,7 +2101,7 @@ var deserializeAws_restJson1DeleteChannelBanCommandError = function (output, con
2101
2101
  case 0:
2102
2102
  _a = [__assign({}, output)];
2103
2103
  _c = {};
2104
- return [4, parseBody(output.body, context)];
2104
+ return [4, parseErrorBody(output.body, context)];
2105
2105
  case 1:
2106
2106
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2107
2107
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2172,7 +2172,7 @@ var deserializeAws_restJson1DeleteChannelFlowCommandError = function (output, co
2172
2172
  case 0:
2173
2173
  _a = [__assign({}, output)];
2174
2174
  _c = {};
2175
- return [4, parseBody(output.body, context)];
2175
+ return [4, parseErrorBody(output.body, context)];
2176
2176
  case 1:
2177
2177
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2178
2178
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2247,7 +2247,7 @@ var deserializeAws_restJson1DeleteChannelMembershipCommandError = function (outp
2247
2247
  case 0:
2248
2248
  _a = [__assign({}, output)];
2249
2249
  _c = {};
2250
- return [4, parseBody(output.body, context)];
2250
+ return [4, parseErrorBody(output.body, context)];
2251
2251
  case 1:
2252
2252
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2253
2253
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2322,7 +2322,7 @@ var deserializeAws_restJson1DeleteChannelMessageCommandError = function (output,
2322
2322
  case 0:
2323
2323
  _a = [__assign({}, output)];
2324
2324
  _c = {};
2325
- return [4, parseBody(output.body, context)];
2325
+ return [4, parseErrorBody(output.body, context)];
2326
2326
  case 1:
2327
2327
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2328
2328
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2393,7 +2393,7 @@ var deserializeAws_restJson1DeleteChannelModeratorCommandError = function (outpu
2393
2393
  case 0:
2394
2394
  _a = [__assign({}, output)];
2395
2395
  _c = {};
2396
- return [4, parseBody(output.body, context)];
2396
+ return [4, parseErrorBody(output.body, context)];
2397
2397
  case 1:
2398
2398
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2399
2399
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2469,7 +2469,7 @@ var deserializeAws_restJson1DescribeChannelCommandError = function (output, cont
2469
2469
  case 0:
2470
2470
  _a = [__assign({}, output)];
2471
2471
  _c = {};
2472
- return [4, parseBody(output.body, context)];
2472
+ return [4, parseErrorBody(output.body, context)];
2473
2473
  case 1:
2474
2474
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2475
2475
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2545,7 +2545,7 @@ var deserializeAws_restJson1DescribeChannelBanCommandError = function (output, c
2545
2545
  case 0:
2546
2546
  _a = [__assign({}, output)];
2547
2547
  _c = {};
2548
- return [4, parseBody(output.body, context)];
2548
+ return [4, parseErrorBody(output.body, context)];
2549
2549
  case 1:
2550
2550
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2551
2551
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2625,7 +2625,7 @@ var deserializeAws_restJson1DescribeChannelFlowCommandError = function (output,
2625
2625
  case 0:
2626
2626
  _a = [__assign({}, output)];
2627
2627
  _c = {};
2628
- return [4, parseBody(output.body, context)];
2628
+ return [4, parseErrorBody(output.body, context)];
2629
2629
  case 1:
2630
2630
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2631
2631
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2701,7 +2701,7 @@ var deserializeAws_restJson1DescribeChannelMembershipCommandError = function (ou
2701
2701
  case 0:
2702
2702
  _a = [__assign({}, output)];
2703
2703
  _c = {};
2704
- return [4, parseBody(output.body, context)];
2704
+ return [4, parseErrorBody(output.body, context)];
2705
2705
  case 1:
2706
2706
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2707
2707
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2781,7 +2781,7 @@ var deserializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommandEr
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);
@@ -2857,7 +2857,7 @@ var deserializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommandErro
2857
2857
  case 0:
2858
2858
  _a = [__assign({}, output)];
2859
2859
  _c = {};
2860
- return [4, parseBody(output.body, context)];
2860
+ return [4, parseErrorBody(output.body, context)];
2861
2861
  case 1:
2862
2862
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2863
2863
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2933,7 +2933,7 @@ var deserializeAws_restJson1DescribeChannelModeratorCommandError = function (out
2933
2933
  case 0:
2934
2934
  _a = [__assign({}, output)];
2935
2935
  _c = {};
2936
- return [4, parseBody(output.body, context)];
2936
+ return [4, parseErrorBody(output.body, context)];
2937
2937
  case 1:
2938
2938
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2939
2939
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3008,7 +3008,7 @@ var deserializeAws_restJson1DisassociateChannelFlowCommandError = function (outp
3008
3008
  case 0:
3009
3009
  _a = [__assign({}, output)];
3010
3010
  _c = {};
3011
- return [4, parseBody(output.body, context)];
3011
+ return [4, parseErrorBody(output.body, context)];
3012
3012
  case 1:
3013
3013
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3014
3014
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3098,7 +3098,7 @@ var deserializeAws_restJson1GetChannelMembershipPreferencesCommandError = functi
3098
3098
  case 0:
3099
3099
  _a = [__assign({}, output)];
3100
3100
  _c = {};
3101
- return [4, parseBody(output.body, context)];
3101
+ return [4, parseErrorBody(output.body, context)];
3102
3102
  case 1:
3103
3103
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3104
3104
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3174,7 +3174,7 @@ var deserializeAws_restJson1GetChannelMessageCommandError = function (output, co
3174
3174
  case 0:
3175
3175
  _a = [__assign({}, output)];
3176
3176
  _c = {};
3177
- return [4, parseBody(output.body, context)];
3177
+ return [4, parseErrorBody(output.body, context)];
3178
3178
  case 1:
3179
3179
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3180
3180
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3254,7 +3254,7 @@ var deserializeAws_restJson1GetChannelMessageStatusCommandError = function (outp
3254
3254
  case 0:
3255
3255
  _a = [__assign({}, output)];
3256
3256
  _c = {};
3257
- return [4, parseBody(output.body, context)];
3257
+ return [4, parseErrorBody(output.body, context)];
3258
3258
  case 1:
3259
3259
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3260
3260
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3330,7 +3330,7 @@ var deserializeAws_restJson1GetMessagingSessionEndpointCommandError = function (
3330
3330
  case 0:
3331
3331
  _a = [__assign({}, output)];
3332
3332
  _c = {};
3333
- return [4, parseBody(output.body, context)];
3333
+ return [4, parseErrorBody(output.body, context)];
3334
3334
  case 1:
3335
3335
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3336
3336
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3408,7 +3408,7 @@ var deserializeAws_restJson1ListChannelBansCommandError = function (output, cont
3408
3408
  case 0:
3409
3409
  _a = [__assign({}, output)];
3410
3410
  _c = {};
3411
- return [4, parseBody(output.body, context)];
3411
+ return [4, parseErrorBody(output.body, context)];
3412
3412
  case 1:
3413
3413
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3414
3414
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3487,7 +3487,7 @@ var deserializeAws_restJson1ListChannelFlowsCommandError = function (output, con
3487
3487
  case 0:
3488
3488
  _a = [__assign({}, output)];
3489
3489
  _c = {};
3490
- return [4, parseBody(output.body, context)];
3490
+ return [4, parseErrorBody(output.body, context)];
3491
3491
  case 1:
3492
3492
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3493
3493
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3569,7 +3569,7 @@ var deserializeAws_restJson1ListChannelMembershipsCommandError = function (outpu
3569
3569
  case 0:
3570
3570
  _a = [__assign({}, output)];
3571
3571
  _c = {};
3572
- return [4, parseBody(output.body, context)];
3572
+ return [4, parseErrorBody(output.body, context)];
3573
3573
  case 1:
3574
3574
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3575
3575
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3648,7 +3648,7 @@ var deserializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommandError
3648
3648
  case 0:
3649
3649
  _a = [__assign({}, output)];
3650
3650
  _c = {};
3651
- return [4, parseBody(output.body, context)];
3651
+ return [4, parseErrorBody(output.body, context)];
3652
3652
  case 1:
3653
3653
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3654
3654
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3733,7 +3733,7 @@ var deserializeAws_restJson1ListChannelMessagesCommandError = function (output,
3733
3733
  case 0:
3734
3734
  _a = [__assign({}, output)];
3735
3735
  _c = {};
3736
- return [4, parseBody(output.body, context)];
3736
+ return [4, parseErrorBody(output.body, context)];
3737
3737
  case 1:
3738
3738
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3739
3739
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3815,7 +3815,7 @@ var deserializeAws_restJson1ListChannelModeratorsCommandError = function (output
3815
3815
  case 0:
3816
3816
  _a = [__assign({}, output)];
3817
3817
  _c = {};
3818
- return [4, parseBody(output.body, context)];
3818
+ return [4, parseErrorBody(output.body, context)];
3819
3819
  case 1:
3820
3820
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3821
3821
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3894,7 +3894,7 @@ var deserializeAws_restJson1ListChannelsCommandError = function (output, context
3894
3894
  case 0:
3895
3895
  _a = [__assign({}, output)];
3896
3896
  _c = {};
3897
- return [4, parseBody(output.body, context)];
3897
+ return [4, parseErrorBody(output.body, context)];
3898
3898
  case 1:
3899
3899
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3900
3900
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3973,7 +3973,7 @@ var deserializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommandError =
3973
3973
  case 0:
3974
3974
  _a = [__assign({}, output)];
3975
3975
  _c = {};
3976
- return [4, parseBody(output.body, context)];
3976
+ return [4, parseErrorBody(output.body, context)];
3977
3977
  case 1:
3978
3978
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3979
3979
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4052,7 +4052,7 @@ var deserializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommandError =
4052
4052
  case 0:
4053
4053
  _a = [__assign({}, output)];
4054
4054
  _c = {};
4055
- return [4, parseBody(output.body, context)];
4055
+ return [4, parseErrorBody(output.body, context)];
4056
4056
  case 1:
4057
4057
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4058
4058
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4134,7 +4134,7 @@ var deserializeAws_restJson1ListSubChannelsCommandError = function (output, cont
4134
4134
  case 0:
4135
4135
  _a = [__assign({}, output)];
4136
4136
  _c = {};
4137
- return [4, parseBody(output.body, context)];
4137
+ return [4, parseErrorBody(output.body, context)];
4138
4138
  case 1:
4139
4139
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4140
4140
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4210,7 +4210,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
4210
4210
  case 0:
4211
4211
  _a = [__assign({}, output)];
4212
4212
  _c = {};
4213
- return [4, parseBody(output.body, context)];
4213
+ return [4, parseErrorBody(output.body, context)];
4214
4214
  case 1:
4215
4215
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4216
4216
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4292,7 +4292,7 @@ var deserializeAws_restJson1PutChannelMembershipPreferencesCommandError = functi
4292
4292
  case 0:
4293
4293
  _a = [__assign({}, output)];
4294
4294
  _c = {};
4295
- return [4, parseBody(output.body, context)];
4295
+ return [4, parseErrorBody(output.body, context)];
4296
4296
  case 1:
4297
4297
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4298
4298
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4378,7 +4378,7 @@ var deserializeAws_restJson1RedactChannelMessageCommandError = function (output,
4378
4378
  case 0:
4379
4379
  _a = [__assign({}, output)];
4380
4380
  _c = {};
4381
- return [4, parseBody(output.body, context)];
4381
+ return [4, parseErrorBody(output.body, context)];
4382
4382
  case 1:
4383
4383
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4384
4384
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4461,7 +4461,7 @@ var deserializeAws_restJson1SearchChannelsCommandError = function (output, conte
4461
4461
  case 0:
4462
4462
  _a = [__assign({}, output)];
4463
4463
  _c = {};
4464
- return [4, parseBody(output.body, context)];
4464
+ return [4, parseErrorBody(output.body, context)];
4465
4465
  case 1:
4466
4466
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4467
4467
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4546,7 +4546,7 @@ var deserializeAws_restJson1SendChannelMessageCommandError = function (output, c
4546
4546
  case 0:
4547
4547
  _a = [__assign({}, output)];
4548
4548
  _c = {};
4549
- return [4, parseBody(output.body, context)];
4549
+ return [4, parseErrorBody(output.body, context)];
4550
4550
  case 1:
4551
4551
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4552
4552
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4621,7 +4621,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
4621
4621
  case 0:
4622
4622
  _a = [__assign({}, output)];
4623
4623
  _c = {};
4624
- return [4, parseBody(output.body, context)];
4624
+ return [4, parseErrorBody(output.body, context)];
4625
4625
  case 1:
4626
4626
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4627
4627
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4696,7 +4696,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
4696
4696
  case 0:
4697
4697
  _a = [__assign({}, output)];
4698
4698
  _c = {};
4699
- return [4, parseBody(output.body, context)];
4699
+ return [4, parseErrorBody(output.body, context)];
4700
4700
  case 1:
4701
4701
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4702
4702
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4772,7 +4772,7 @@ var deserializeAws_restJson1UpdateChannelCommandError = function (output, contex
4772
4772
  case 0:
4773
4773
  _a = [__assign({}, output)];
4774
4774
  _c = {};
4775
- return [4, parseBody(output.body, context)];
4775
+ return [4, parseErrorBody(output.body, context)];
4776
4776
  case 1:
4777
4777
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4778
4778
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4852,7 +4852,7 @@ var deserializeAws_restJson1UpdateChannelFlowCommandError = function (output, co
4852
4852
  case 0:
4853
4853
  _a = [__assign({}, output)];
4854
4854
  _c = {};
4855
- return [4, parseBody(output.body, context)];
4855
+ return [4, parseErrorBody(output.body, context)];
4856
4856
  case 1:
4857
4857
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4858
4858
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4941,7 +4941,7 @@ var deserializeAws_restJson1UpdateChannelMessageCommandError = function (output,
4941
4941
  case 0:
4942
4942
  _a = [__assign({}, output)];
4943
4943
  _c = {};
4944
- return [4, parseBody(output.body, context)];
4944
+ return [4, parseErrorBody(output.body, context)];
4945
4945
  case 1:
4946
4946
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4947
4947
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5024,7 +5024,7 @@ var deserializeAws_restJson1UpdateChannelReadMarkerCommandError = function (outp
5024
5024
  case 0:
5025
5025
  _a = [__assign({}, output)];
5026
5026
  _c = {};
5027
- return [4, parseBody(output.body, context)];
5027
+ return [4, parseErrorBody(output.body, context)];
5028
5028
  case 1:
5029
5029
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5030
5030
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5820,6 +5820,19 @@ var parseBody = function (streamBody, context) {
5820
5820
  return {};
5821
5821
  });
5822
5822
  };
5823
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
5824
+ var value;
5825
+ var _a;
5826
+ return __generator(this, function (_b) {
5827
+ switch (_b.label) {
5828
+ case 0: return [4, parseBody(errorBody, context)];
5829
+ case 1:
5830
+ value = _b.sent();
5831
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
5832
+ return [2, value];
5833
+ }
5834
+ });
5835
+ }); };
5823
5836
  var loadRestJsonErrorCode = function (output, data) {
5824
5837
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
5825
5838
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-chime-sdk-messaging",
3
3
  "description": "AWS SDK for JavaScript Chime Sdk Messaging Client for Node.js, Browser and React Native",
4
- "version": "3.179.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.179.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.178.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",
@@ -37,15 +37,15 @@
37
37
  "@aws-sdk/node-config-provider": "3.178.0",
38
38
  "@aws-sdk/node-http-handler": "3.178.0",
39
39
  "@aws-sdk/protocol-http": "3.178.0",
40
- "@aws-sdk/smithy-client": "3.178.0",
40
+ "@aws-sdk/smithy-client": "3.180.0",
41
41
  "@aws-sdk/types": "3.178.0",
42
42
  "@aws-sdk/url-parser": "3.178.0",
43
43
  "@aws-sdk/util-base64-browser": "3.170.0",
44
44
  "@aws-sdk/util-base64-node": "3.170.0",
45
45
  "@aws-sdk/util-body-length-browser": "3.170.0",
46
46
  "@aws-sdk/util-body-length-node": "3.170.0",
47
- "@aws-sdk/util-defaults-mode-browser": "3.178.0",
48
- "@aws-sdk/util-defaults-mode-node": "3.178.0",
47
+ "@aws-sdk/util-defaults-mode-browser": "3.180.0",
48
+ "@aws-sdk/util-defaults-mode-node": "3.180.0",
49
49
  "@aws-sdk/util-user-agent-browser": "3.178.0",
50
50
  "@aws-sdk/util-user-agent-node": "3.178.0",
51
51
  "@aws-sdk/util-utf8-browser": "3.170.0",