@aws-sdk/client-customer-profiles 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-customer-profiles
@@ -969,7 +969,7 @@ exports.deserializeAws_restJson1AddProfileKeyCommand = deserializeAws_restJson1A
969
969
  const deserializeAws_restJson1AddProfileKeyCommandError = async (output, context) => {
970
970
  const parsedOutput = {
971
971
  ...output,
972
- body: await parseBody(output.body, context),
972
+ body: await parseErrorBody(output.body, context),
973
973
  };
974
974
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
975
975
  switch (errorCode) {
@@ -1036,7 +1036,7 @@ exports.deserializeAws_restJson1CreateDomainCommand = deserializeAws_restJson1Cr
1036
1036
  const deserializeAws_restJson1CreateDomainCommandError = async (output, context) => {
1037
1037
  const parsedOutput = {
1038
1038
  ...output,
1039
- body: await parseBody(output.body, context),
1039
+ body: await parseErrorBody(output.body, context),
1040
1040
  };
1041
1041
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1042
1042
  switch (errorCode) {
@@ -1085,7 +1085,7 @@ exports.deserializeAws_restJson1CreateIntegrationWorkflowCommand = deserializeAw
1085
1085
  const deserializeAws_restJson1CreateIntegrationWorkflowCommandError = async (output, context) => {
1086
1086
  const parsedOutput = {
1087
1087
  ...output,
1088
- body: await parseBody(output.body, context),
1088
+ body: await parseErrorBody(output.body, context),
1089
1089
  };
1090
1090
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1091
1091
  switch (errorCode) {
@@ -1131,7 +1131,7 @@ exports.deserializeAws_restJson1CreateProfileCommand = deserializeAws_restJson1C
1131
1131
  const deserializeAws_restJson1CreateProfileCommandError = async (output, context) => {
1132
1132
  const parsedOutput = {
1133
1133
  ...output,
1134
- body: await parseBody(output.body, context),
1134
+ body: await parseErrorBody(output.body, context),
1135
1135
  };
1136
1136
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1137
1137
  switch (errorCode) {
@@ -1177,7 +1177,7 @@ exports.deserializeAws_restJson1DeleteDomainCommand = deserializeAws_restJson1De
1177
1177
  const deserializeAws_restJson1DeleteDomainCommandError = async (output, context) => {
1178
1178
  const parsedOutput = {
1179
1179
  ...output,
1180
- body: await parseBody(output.body, context),
1180
+ body: await parseErrorBody(output.body, context),
1181
1181
  };
1182
1182
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1183
1183
  switch (errorCode) {
@@ -1223,7 +1223,7 @@ exports.deserializeAws_restJson1DeleteIntegrationCommand = deserializeAws_restJs
1223
1223
  const deserializeAws_restJson1DeleteIntegrationCommandError = async (output, context) => {
1224
1224
  const parsedOutput = {
1225
1225
  ...output,
1226
- body: await parseBody(output.body, context),
1226
+ body: await parseErrorBody(output.body, context),
1227
1227
  };
1228
1228
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1229
1229
  switch (errorCode) {
@@ -1269,7 +1269,7 @@ exports.deserializeAws_restJson1DeleteProfileCommand = deserializeAws_restJson1D
1269
1269
  const deserializeAws_restJson1DeleteProfileCommandError = async (output, context) => {
1270
1270
  const parsedOutput = {
1271
1271
  ...output,
1272
- body: await parseBody(output.body, context),
1272
+ body: await parseErrorBody(output.body, context),
1273
1273
  };
1274
1274
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1275
1275
  switch (errorCode) {
@@ -1315,7 +1315,7 @@ exports.deserializeAws_restJson1DeleteProfileKeyCommand = deserializeAws_restJso
1315
1315
  const deserializeAws_restJson1DeleteProfileKeyCommandError = async (output, context) => {
1316
1316
  const parsedOutput = {
1317
1317
  ...output,
1318
- body: await parseBody(output.body, context),
1318
+ body: await parseErrorBody(output.body, context),
1319
1319
  };
1320
1320
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1321
1321
  switch (errorCode) {
@@ -1361,7 +1361,7 @@ exports.deserializeAws_restJson1DeleteProfileObjectCommand = deserializeAws_rest
1361
1361
  const deserializeAws_restJson1DeleteProfileObjectCommandError = async (output, context) => {
1362
1362
  const parsedOutput = {
1363
1363
  ...output,
1364
- body: await parseBody(output.body, context),
1364
+ body: await parseErrorBody(output.body, context),
1365
1365
  };
1366
1366
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1367
1367
  switch (errorCode) {
@@ -1407,7 +1407,7 @@ exports.deserializeAws_restJson1DeleteProfileObjectTypeCommand = deserializeAws_
1407
1407
  const deserializeAws_restJson1DeleteProfileObjectTypeCommandError = async (output, context) => {
1408
1408
  const parsedOutput = {
1409
1409
  ...output,
1410
- body: await parseBody(output.body, context),
1410
+ body: await parseErrorBody(output.body, context),
1411
1411
  };
1412
1412
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1413
1413
  switch (errorCode) {
@@ -1450,7 +1450,7 @@ exports.deserializeAws_restJson1DeleteWorkflowCommand = deserializeAws_restJson1
1450
1450
  const deserializeAws_restJson1DeleteWorkflowCommandError = async (output, context) => {
1451
1451
  const parsedOutput = {
1452
1452
  ...output,
1453
- body: await parseBody(output.body, context),
1453
+ body: await parseErrorBody(output.body, context),
1454
1454
  };
1455
1455
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1456
1456
  switch (errorCode) {
@@ -1505,7 +1505,7 @@ exports.deserializeAws_restJson1GetAutoMergingPreviewCommand = deserializeAws_re
1505
1505
  const deserializeAws_restJson1GetAutoMergingPreviewCommandError = async (output, context) => {
1506
1506
  const parsedOutput = {
1507
1507
  ...output,
1508
- body: await parseBody(output.body, context),
1508
+ body: await parseErrorBody(output.body, context),
1509
1509
  };
1510
1510
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1511
1511
  switch (errorCode) {
@@ -1575,7 +1575,7 @@ exports.deserializeAws_restJson1GetDomainCommand = deserializeAws_restJson1GetDo
1575
1575
  const deserializeAws_restJson1GetDomainCommandError = async (output, context) => {
1576
1576
  const parsedOutput = {
1577
1577
  ...output,
1578
- body: await parseBody(output.body, context),
1578
+ body: await parseErrorBody(output.body, context),
1579
1579
  };
1580
1580
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1581
1581
  switch (errorCode) {
@@ -1651,7 +1651,7 @@ exports.deserializeAws_restJson1GetIdentityResolutionJobCommand = deserializeAws
1651
1651
  const deserializeAws_restJson1GetIdentityResolutionJobCommandError = async (output, context) => {
1652
1652
  const parsedOutput = {
1653
1653
  ...output,
1654
- body: await parseBody(output.body, context),
1654
+ body: await parseErrorBody(output.body, context),
1655
1655
  };
1656
1656
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1657
1657
  switch (errorCode) {
@@ -1721,7 +1721,7 @@ exports.deserializeAws_restJson1GetIntegrationCommand = deserializeAws_restJson1
1721
1721
  const deserializeAws_restJson1GetIntegrationCommandError = async (output, context) => {
1722
1722
  const parsedOutput = {
1723
1723
  ...output,
1724
- body: await parseBody(output.body, context),
1724
+ body: await parseErrorBody(output.body, context),
1725
1725
  };
1726
1726
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1727
1727
  switch (errorCode) {
@@ -1776,7 +1776,7 @@ exports.deserializeAws_restJson1GetMatchesCommand = deserializeAws_restJson1GetM
1776
1776
  const deserializeAws_restJson1GetMatchesCommandError = async (output, context) => {
1777
1777
  const parsedOutput = {
1778
1778
  ...output,
1779
- body: await parseBody(output.body, context),
1779
+ body: await parseErrorBody(output.body, context),
1780
1780
  };
1781
1781
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1782
1782
  switch (errorCode) {
@@ -1855,7 +1855,7 @@ exports.deserializeAws_restJson1GetProfileObjectTypeCommand = deserializeAws_res
1855
1855
  const deserializeAws_restJson1GetProfileObjectTypeCommandError = async (output, context) => {
1856
1856
  const parsedOutput = {
1857
1857
  ...output,
1858
- body: await parseBody(output.body, context),
1858
+ body: await parseErrorBody(output.body, context),
1859
1859
  };
1860
1860
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1861
1861
  switch (errorCode) {
@@ -1919,7 +1919,7 @@ exports.deserializeAws_restJson1GetProfileObjectTypeTemplateCommand = deserializ
1919
1919
  const deserializeAws_restJson1GetProfileObjectTypeTemplateCommandError = async (output, context) => {
1920
1920
  const parsedOutput = {
1921
1921
  ...output,
1922
- body: await parseBody(output.body, context),
1922
+ body: await parseErrorBody(output.body, context),
1923
1923
  };
1924
1924
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1925
1925
  switch (errorCode) {
@@ -1986,7 +1986,7 @@ exports.deserializeAws_restJson1GetWorkflowCommand = deserializeAws_restJson1Get
1986
1986
  const deserializeAws_restJson1GetWorkflowCommandError = async (output, context) => {
1987
1987
  const parsedOutput = {
1988
1988
  ...output,
1989
- body: await parseBody(output.body, context),
1989
+ body: await parseErrorBody(output.body, context),
1990
1990
  };
1991
1991
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1992
1992
  switch (errorCode) {
@@ -2041,7 +2041,7 @@ exports.deserializeAws_restJson1GetWorkflowStepsCommand = deserializeAws_restJso
2041
2041
  const deserializeAws_restJson1GetWorkflowStepsCommandError = async (output, context) => {
2042
2042
  const parsedOutput = {
2043
2043
  ...output,
2044
- body: await parseBody(output.body, context),
2044
+ body: await parseErrorBody(output.body, context),
2045
2045
  };
2046
2046
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2047
2047
  switch (errorCode) {
@@ -2090,7 +2090,7 @@ exports.deserializeAws_restJson1ListAccountIntegrationsCommand = deserializeAws_
2090
2090
  const deserializeAws_restJson1ListAccountIntegrationsCommandError = async (output, context) => {
2091
2091
  const parsedOutput = {
2092
2092
  ...output,
2093
- body: await parseBody(output.body, context),
2093
+ body: await parseErrorBody(output.body, context),
2094
2094
  };
2095
2095
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2096
2096
  switch (errorCode) {
@@ -2139,7 +2139,7 @@ exports.deserializeAws_restJson1ListDomainsCommand = deserializeAws_restJson1Lis
2139
2139
  const deserializeAws_restJson1ListDomainsCommandError = async (output, context) => {
2140
2140
  const parsedOutput = {
2141
2141
  ...output,
2142
- body: await parseBody(output.body, context),
2142
+ body: await parseErrorBody(output.body, context),
2143
2143
  };
2144
2144
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2145
2145
  switch (errorCode) {
@@ -2188,7 +2188,7 @@ exports.deserializeAws_restJson1ListIdentityResolutionJobsCommand = deserializeA
2188
2188
  const deserializeAws_restJson1ListIdentityResolutionJobsCommandError = async (output, context) => {
2189
2189
  const parsedOutput = {
2190
2190
  ...output,
2191
- body: await parseBody(output.body, context),
2191
+ body: await parseErrorBody(output.body, context),
2192
2192
  };
2193
2193
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2194
2194
  switch (errorCode) {
@@ -2237,7 +2237,7 @@ exports.deserializeAws_restJson1ListIntegrationsCommand = deserializeAws_restJso
2237
2237
  const deserializeAws_restJson1ListIntegrationsCommandError = async (output, context) => {
2238
2238
  const parsedOutput = {
2239
2239
  ...output,
2240
- body: await parseBody(output.body, context),
2240
+ body: await parseErrorBody(output.body, context),
2241
2241
  };
2242
2242
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2243
2243
  switch (errorCode) {
@@ -2286,7 +2286,7 @@ exports.deserializeAws_restJson1ListProfileObjectsCommand = deserializeAws_restJ
2286
2286
  const deserializeAws_restJson1ListProfileObjectsCommandError = async (output, context) => {
2287
2287
  const parsedOutput = {
2288
2288
  ...output,
2289
- body: await parseBody(output.body, context),
2289
+ body: await parseErrorBody(output.body, context),
2290
2290
  };
2291
2291
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2292
2292
  switch (errorCode) {
@@ -2335,7 +2335,7 @@ exports.deserializeAws_restJson1ListProfileObjectTypesCommand = deserializeAws_r
2335
2335
  const deserializeAws_restJson1ListProfileObjectTypesCommandError = async (output, context) => {
2336
2336
  const parsedOutput = {
2337
2337
  ...output,
2338
- body: await parseBody(output.body, context),
2338
+ body: await parseErrorBody(output.body, context),
2339
2339
  };
2340
2340
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2341
2341
  switch (errorCode) {
@@ -2384,7 +2384,7 @@ exports.deserializeAws_restJson1ListProfileObjectTypeTemplatesCommand = deserial
2384
2384
  const deserializeAws_restJson1ListProfileObjectTypeTemplatesCommandError = async (output, context) => {
2385
2385
  const parsedOutput = {
2386
2386
  ...output,
2387
- body: await parseBody(output.body, context),
2387
+ body: await parseErrorBody(output.body, context),
2388
2388
  };
2389
2389
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2390
2390
  switch (errorCode) {
@@ -2430,7 +2430,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
2430
2430
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
2431
2431
  const parsedOutput = {
2432
2432
  ...output,
2433
- body: await parseBody(output.body, context),
2433
+ body: await parseErrorBody(output.body, context),
2434
2434
  };
2435
2435
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2436
2436
  switch (errorCode) {
@@ -2473,7 +2473,7 @@ exports.deserializeAws_restJson1ListWorkflowsCommand = deserializeAws_restJson1L
2473
2473
  const deserializeAws_restJson1ListWorkflowsCommandError = async (output, context) => {
2474
2474
  const parsedOutput = {
2475
2475
  ...output,
2476
- body: await parseBody(output.body, context),
2476
+ body: await parseErrorBody(output.body, context),
2477
2477
  };
2478
2478
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2479
2479
  switch (errorCode) {
@@ -2519,7 +2519,7 @@ exports.deserializeAws_restJson1MergeProfilesCommand = deserializeAws_restJson1M
2519
2519
  const deserializeAws_restJson1MergeProfilesCommandError = async (output, context) => {
2520
2520
  const parsedOutput = {
2521
2521
  ...output,
2522
- body: await parseBody(output.body, context),
2522
+ body: await parseErrorBody(output.body, context),
2523
2523
  };
2524
2524
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2525
2525
  switch (errorCode) {
@@ -2586,7 +2586,7 @@ exports.deserializeAws_restJson1PutIntegrationCommand = deserializeAws_restJson1
2586
2586
  const deserializeAws_restJson1PutIntegrationCommandError = async (output, context) => {
2587
2587
  const parsedOutput = {
2588
2588
  ...output,
2589
- body: await parseBody(output.body, context),
2589
+ body: await parseErrorBody(output.body, context),
2590
2590
  };
2591
2591
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2592
2592
  switch (errorCode) {
@@ -2632,7 +2632,7 @@ exports.deserializeAws_restJson1PutProfileObjectCommand = deserializeAws_restJso
2632
2632
  const deserializeAws_restJson1PutProfileObjectCommandError = async (output, context) => {
2633
2633
  const parsedOutput = {
2634
2634
  ...output,
2635
- body: await parseBody(output.body, context),
2635
+ body: await parseErrorBody(output.body, context),
2636
2636
  };
2637
2637
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2638
2638
  switch (errorCode) {
@@ -2711,7 +2711,7 @@ exports.deserializeAws_restJson1PutProfileObjectTypeCommand = deserializeAws_res
2711
2711
  const deserializeAws_restJson1PutProfileObjectTypeCommandError = async (output, context) => {
2712
2712
  const parsedOutput = {
2713
2713
  ...output,
2714
- body: await parseBody(output.body, context),
2714
+ body: await parseErrorBody(output.body, context),
2715
2715
  };
2716
2716
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2717
2717
  switch (errorCode) {
@@ -2760,7 +2760,7 @@ exports.deserializeAws_restJson1SearchProfilesCommand = deserializeAws_restJson1
2760
2760
  const deserializeAws_restJson1SearchProfilesCommandError = async (output, context) => {
2761
2761
  const parsedOutput = {
2762
2762
  ...output,
2763
- body: await parseBody(output.body, context),
2763
+ body: await parseErrorBody(output.body, context),
2764
2764
  };
2765
2765
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2766
2766
  switch (errorCode) {
@@ -2803,7 +2803,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
2803
2803
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
2804
2804
  const parsedOutput = {
2805
2805
  ...output,
2806
- body: await parseBody(output.body, context),
2806
+ body: await parseErrorBody(output.body, context),
2807
2807
  };
2808
2808
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2809
2809
  switch (errorCode) {
@@ -2840,7 +2840,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
2840
2840
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
2841
2841
  const parsedOutput = {
2842
2842
  ...output,
2843
- body: await parseBody(output.body, context),
2843
+ body: await parseErrorBody(output.body, context),
2844
2844
  };
2845
2845
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2846
2846
  switch (errorCode) {
@@ -2901,7 +2901,7 @@ exports.deserializeAws_restJson1UpdateDomainCommand = deserializeAws_restJson1Up
2901
2901
  const deserializeAws_restJson1UpdateDomainCommandError = async (output, context) => {
2902
2902
  const parsedOutput = {
2903
2903
  ...output,
2904
- body: await parseBody(output.body, context),
2904
+ body: await parseErrorBody(output.body, context),
2905
2905
  };
2906
2906
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2907
2907
  switch (errorCode) {
@@ -2947,7 +2947,7 @@ exports.deserializeAws_restJson1UpdateProfileCommand = deserializeAws_restJson1U
2947
2947
  const deserializeAws_restJson1UpdateProfileCommandError = async (output, context) => {
2948
2948
  const parsedOutput = {
2949
2949
  ...output,
2950
- body: await parseBody(output.body, context),
2950
+ body: await parseErrorBody(output.body, context),
2951
2951
  };
2952
2952
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2953
2953
  switch (errorCode) {
@@ -4008,6 +4008,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
4008
4008
  }
4009
4009
  return {};
4010
4010
  });
4011
+ const parseErrorBody = async (errorBody, context) => {
4012
+ var _a;
4013
+ const value = await parseBody(errorBody, context);
4014
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
4015
+ return value;
4016
+ };
4011
4017
  const loadRestJsonErrorCode = (output, data) => {
4012
4018
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
4013
4019
  const sanitizeErrorCode = (rawValue) => {
@@ -1046,7 +1046,7 @@ var deserializeAws_restJson1AddProfileKeyCommandError = function (output, contex
1046
1046
  case 0:
1047
1047
  _a = [__assign({}, output)];
1048
1048
  _c = {};
1049
- return [4, parseBody(output.body, context)];
1049
+ return [4, parseErrorBody(output.body, context)];
1050
1050
  case 1:
1051
1051
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1052
1052
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1139,7 +1139,7 @@ var deserializeAws_restJson1CreateDomainCommandError = function (output, context
1139
1139
  case 0:
1140
1140
  _a = [__assign({}, output)];
1141
1141
  _c = {};
1142
- return [4, parseBody(output.body, context)];
1142
+ return [4, parseErrorBody(output.body, context)];
1143
1143
  case 1:
1144
1144
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1145
1145
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1214,7 +1214,7 @@ var deserializeAws_restJson1CreateIntegrationWorkflowCommandError = function (ou
1214
1214
  case 0:
1215
1215
  _a = [__assign({}, output)];
1216
1216
  _c = {};
1217
- return [4, parseBody(output.body, context)];
1217
+ return [4, parseErrorBody(output.body, context)];
1218
1218
  case 1:
1219
1219
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1220
1220
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1286,7 +1286,7 @@ var deserializeAws_restJson1CreateProfileCommandError = function (output, contex
1286
1286
  case 0:
1287
1287
  _a = [__assign({}, output)];
1288
1288
  _c = {};
1289
- return [4, parseBody(output.body, context)];
1289
+ return [4, parseErrorBody(output.body, context)];
1290
1290
  case 1:
1291
1291
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1292
1292
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1358,7 +1358,7 @@ var deserializeAws_restJson1DeleteDomainCommandError = function (output, context
1358
1358
  case 0:
1359
1359
  _a = [__assign({}, output)];
1360
1360
  _c = {};
1361
- return [4, parseBody(output.body, context)];
1361
+ return [4, parseErrorBody(output.body, context)];
1362
1362
  case 1:
1363
1363
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1364
1364
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1430,7 +1430,7 @@ var deserializeAws_restJson1DeleteIntegrationCommandError = function (output, co
1430
1430
  case 0:
1431
1431
  _a = [__assign({}, output)];
1432
1432
  _c = {};
1433
- return [4, parseBody(output.body, context)];
1433
+ return [4, parseErrorBody(output.body, context)];
1434
1434
  case 1:
1435
1435
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1436
1436
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1502,7 +1502,7 @@ var deserializeAws_restJson1DeleteProfileCommandError = function (output, contex
1502
1502
  case 0:
1503
1503
  _a = [__assign({}, output)];
1504
1504
  _c = {};
1505
- return [4, parseBody(output.body, context)];
1505
+ return [4, parseErrorBody(output.body, context)];
1506
1506
  case 1:
1507
1507
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1508
1508
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1574,7 +1574,7 @@ var deserializeAws_restJson1DeleteProfileKeyCommandError = function (output, con
1574
1574
  case 0:
1575
1575
  _a = [__assign({}, output)];
1576
1576
  _c = {};
1577
- return [4, parseBody(output.body, context)];
1577
+ return [4, parseErrorBody(output.body, context)];
1578
1578
  case 1:
1579
1579
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1580
1580
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1646,7 +1646,7 @@ var deserializeAws_restJson1DeleteProfileObjectCommandError = function (output,
1646
1646
  case 0:
1647
1647
  _a = [__assign({}, output)];
1648
1648
  _c = {};
1649
- return [4, parseBody(output.body, context)];
1649
+ return [4, parseErrorBody(output.body, context)];
1650
1650
  case 1:
1651
1651
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1652
1652
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1718,7 +1718,7 @@ var deserializeAws_restJson1DeleteProfileObjectTypeCommandError = function (outp
1718
1718
  case 0:
1719
1719
  _a = [__assign({}, output)];
1720
1720
  _c = {};
1721
- return [4, parseBody(output.body, context)];
1721
+ return [4, parseErrorBody(output.body, context)];
1722
1722
  case 1:
1723
1723
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1724
1724
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1785,7 +1785,7 @@ var deserializeAws_restJson1DeleteWorkflowCommandError = function (output, conte
1785
1785
  case 0:
1786
1786
  _a = [__assign({}, output)];
1787
1787
  _c = {};
1788
- return [4, parseBody(output.body, context)];
1788
+ return [4, parseErrorBody(output.body, context)];
1789
1789
  case 1:
1790
1790
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1791
1791
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1866,7 +1866,7 @@ var deserializeAws_restJson1GetAutoMergingPreviewCommandError = function (output
1866
1866
  case 0:
1867
1867
  _a = [__assign({}, output)];
1868
1868
  _c = {};
1869
- return [4, parseBody(output.body, context)];
1869
+ return [4, parseErrorBody(output.body, context)];
1870
1870
  case 1:
1871
1871
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1872
1872
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1962,7 +1962,7 @@ var deserializeAws_restJson1GetDomainCommandError = function (output, context) {
1962
1962
  case 0:
1963
1963
  _a = [__assign({}, output)];
1964
1964
  _c = {};
1965
- return [4, parseBody(output.body, context)];
1965
+ return [4, parseErrorBody(output.body, context)];
1966
1966
  case 1:
1967
1967
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1968
1968
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2064,7 +2064,7 @@ var deserializeAws_restJson1GetIdentityResolutionJobCommandError = function (out
2064
2064
  case 0:
2065
2065
  _a = [__assign({}, output)];
2066
2066
  _c = {};
2067
- return [4, parseBody(output.body, context)];
2067
+ return [4, parseErrorBody(output.body, context)];
2068
2068
  case 1:
2069
2069
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2070
2070
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2160,7 +2160,7 @@ var deserializeAws_restJson1GetIntegrationCommandError = function (output, conte
2160
2160
  case 0:
2161
2161
  _a = [__assign({}, output)];
2162
2162
  _c = {};
2163
- return [4, parseBody(output.body, context)];
2163
+ return [4, parseErrorBody(output.body, context)];
2164
2164
  case 1:
2165
2165
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2166
2166
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2241,7 +2241,7 @@ var deserializeAws_restJson1GetMatchesCommandError = function (output, context)
2241
2241
  case 0:
2242
2242
  _a = [__assign({}, output)];
2243
2243
  _c = {};
2244
- return [4, parseBody(output.body, context)];
2244
+ return [4, parseErrorBody(output.body, context)];
2245
2245
  case 1:
2246
2246
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2247
2247
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2346,7 +2346,7 @@ var deserializeAws_restJson1GetProfileObjectTypeCommandError = function (output,
2346
2346
  case 0:
2347
2347
  _a = [__assign({}, output)];
2348
2348
  _c = {};
2349
- return [4, parseBody(output.body, context)];
2349
+ return [4, parseErrorBody(output.body, context)];
2350
2350
  case 1:
2351
2351
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2352
2352
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2436,7 +2436,7 @@ var deserializeAws_restJson1GetProfileObjectTypeTemplateCommandError = function
2436
2436
  case 0:
2437
2437
  _a = [__assign({}, output)];
2438
2438
  _c = {};
2439
- return [4, parseBody(output.body, context)];
2439
+ return [4, parseErrorBody(output.body, context)];
2440
2440
  case 1:
2441
2441
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2442
2442
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2529,7 +2529,7 @@ var deserializeAws_restJson1GetWorkflowCommandError = function (output, context)
2529
2529
  case 0:
2530
2530
  _a = [__assign({}, output)];
2531
2531
  _c = {};
2532
- return [4, parseBody(output.body, context)];
2532
+ return [4, parseErrorBody(output.body, context)];
2533
2533
  case 1:
2534
2534
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2535
2535
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2610,7 +2610,7 @@ var deserializeAws_restJson1GetWorkflowStepsCommandError = function (output, con
2610
2610
  case 0:
2611
2611
  _a = [__assign({}, output)];
2612
2612
  _c = {};
2613
- return [4, parseBody(output.body, context)];
2613
+ return [4, parseErrorBody(output.body, context)];
2614
2614
  case 1:
2615
2615
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2616
2616
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2685,7 +2685,7 @@ var deserializeAws_restJson1ListAccountIntegrationsCommandError = function (outp
2685
2685
  case 0:
2686
2686
  _a = [__assign({}, output)];
2687
2687
  _c = {};
2688
- return [4, parseBody(output.body, context)];
2688
+ return [4, parseErrorBody(output.body, context)];
2689
2689
  case 1:
2690
2690
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2691
2691
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2760,7 +2760,7 @@ var deserializeAws_restJson1ListDomainsCommandError = function (output, context)
2760
2760
  case 0:
2761
2761
  _a = [__assign({}, output)];
2762
2762
  _c = {};
2763
- return [4, parseBody(output.body, context)];
2763
+ return [4, parseErrorBody(output.body, context)];
2764
2764
  case 1:
2765
2765
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2766
2766
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2835,7 +2835,7 @@ var deserializeAws_restJson1ListIdentityResolutionJobsCommandError = function (o
2835
2835
  case 0:
2836
2836
  _a = [__assign({}, output)];
2837
2837
  _c = {};
2838
- return [4, parseBody(output.body, context)];
2838
+ return [4, parseErrorBody(output.body, context)];
2839
2839
  case 1:
2840
2840
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2841
2841
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2910,7 +2910,7 @@ var deserializeAws_restJson1ListIntegrationsCommandError = function (output, con
2910
2910
  case 0:
2911
2911
  _a = [__assign({}, output)];
2912
2912
  _c = {};
2913
- return [4, parseBody(output.body, context)];
2913
+ return [4, parseErrorBody(output.body, context)];
2914
2914
  case 1:
2915
2915
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2916
2916
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2985,7 +2985,7 @@ var deserializeAws_restJson1ListProfileObjectsCommandError = function (output, c
2985
2985
  case 0:
2986
2986
  _a = [__assign({}, output)];
2987
2987
  _c = {};
2988
- return [4, parseBody(output.body, context)];
2988
+ return [4, parseErrorBody(output.body, context)];
2989
2989
  case 1:
2990
2990
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2991
2991
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3060,7 +3060,7 @@ var deserializeAws_restJson1ListProfileObjectTypesCommandError = function (outpu
3060
3060
  case 0:
3061
3061
  _a = [__assign({}, output)];
3062
3062
  _c = {};
3063
- return [4, parseBody(output.body, context)];
3063
+ return [4, parseErrorBody(output.body, context)];
3064
3064
  case 1:
3065
3065
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3066
3066
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3135,7 +3135,7 @@ var deserializeAws_restJson1ListProfileObjectTypeTemplatesCommandError = functio
3135
3135
  case 0:
3136
3136
  _a = [__assign({}, output)];
3137
3137
  _c = {};
3138
- return [4, parseBody(output.body, context)];
3138
+ return [4, parseErrorBody(output.body, context)];
3139
3139
  case 1:
3140
3140
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3141
3141
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3207,7 +3207,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
3207
3207
  case 0:
3208
3208
  _a = [__assign({}, output)];
3209
3209
  _c = {};
3210
- return [4, parseBody(output.body, context)];
3210
+ return [4, parseErrorBody(output.body, context)];
3211
3211
  case 1:
3212
3212
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3213
3213
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3274,7 +3274,7 @@ var deserializeAws_restJson1ListWorkflowsCommandError = function (output, contex
3274
3274
  case 0:
3275
3275
  _a = [__assign({}, output)];
3276
3276
  _c = {};
3277
- return [4, parseBody(output.body, context)];
3277
+ return [4, parseErrorBody(output.body, context)];
3278
3278
  case 1:
3279
3279
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3280
3280
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3346,7 +3346,7 @@ var deserializeAws_restJson1MergeProfilesCommandError = function (output, contex
3346
3346
  case 0:
3347
3347
  _a = [__assign({}, output)];
3348
3348
  _c = {};
3349
- return [4, parseBody(output.body, context)];
3349
+ return [4, parseErrorBody(output.body, context)];
3350
3350
  case 1:
3351
3351
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3352
3352
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3438,7 +3438,7 @@ var deserializeAws_restJson1PutIntegrationCommandError = function (output, conte
3438
3438
  case 0:
3439
3439
  _a = [__assign({}, output)];
3440
3440
  _c = {};
3441
- return [4, parseBody(output.body, context)];
3441
+ return [4, parseErrorBody(output.body, context)];
3442
3442
  case 1:
3443
3443
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3444
3444
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3510,7 +3510,7 @@ var deserializeAws_restJson1PutProfileObjectCommandError = function (output, con
3510
3510
  case 0:
3511
3511
  _a = [__assign({}, output)];
3512
3512
  _c = {};
3513
- return [4, parseBody(output.body, context)];
3513
+ return [4, parseErrorBody(output.body, context)];
3514
3514
  case 1:
3515
3515
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3516
3516
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3615,7 +3615,7 @@ var deserializeAws_restJson1PutProfileObjectTypeCommandError = function (output,
3615
3615
  case 0:
3616
3616
  _a = [__assign({}, output)];
3617
3617
  _c = {};
3618
- return [4, parseBody(output.body, context)];
3618
+ return [4, parseErrorBody(output.body, context)];
3619
3619
  case 1:
3620
3620
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3621
3621
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3690,7 +3690,7 @@ var deserializeAws_restJson1SearchProfilesCommandError = function (output, conte
3690
3690
  case 0:
3691
3691
  _a = [__assign({}, output)];
3692
3692
  _c = {};
3693
- return [4, parseBody(output.body, context)];
3693
+ return [4, parseErrorBody(output.body, context)];
3694
3694
  case 1:
3695
3695
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3696
3696
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3757,7 +3757,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
3757
3757
  case 0:
3758
3758
  _a = [__assign({}, output)];
3759
3759
  _c = {};
3760
- return [4, parseBody(output.body, context)];
3760
+ return [4, parseErrorBody(output.body, context)];
3761
3761
  case 1:
3762
3762
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3763
3763
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3816,7 +3816,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
3816
3816
  case 0:
3817
3817
  _a = [__assign({}, output)];
3818
3818
  _c = {};
3819
- return [4, parseBody(output.body, context)];
3819
+ return [4, parseErrorBody(output.body, context)];
3820
3820
  case 1:
3821
3821
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3822
3822
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3901,7 +3901,7 @@ var deserializeAws_restJson1UpdateDomainCommandError = function (output, context
3901
3901
  case 0:
3902
3902
  _a = [__assign({}, output)];
3903
3903
  _c = {};
3904
- return [4, parseBody(output.body, context)];
3904
+ return [4, parseErrorBody(output.body, context)];
3905
3905
  case 1:
3906
3906
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3907
3907
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3973,7 +3973,7 @@ var deserializeAws_restJson1UpdateProfileCommandError = function (output, contex
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);
@@ -4897,6 +4897,19 @@ var parseBody = function (streamBody, context) {
4897
4897
  return {};
4898
4898
  });
4899
4899
  };
4900
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
4901
+ var value;
4902
+ var _a;
4903
+ return __generator(this, function (_b) {
4904
+ switch (_b.label) {
4905
+ case 0: return [4, parseBody(errorBody, context)];
4906
+ case 1:
4907
+ value = _b.sent();
4908
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
4909
+ return [2, value];
4910
+ }
4911
+ });
4912
+ }); };
4900
4913
  var loadRestJsonErrorCode = function (output, data) {
4901
4914
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
4902
4915
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-customer-profiles",
3
3
  "description": "AWS SDK for JavaScript Customer Profiles 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",