@aws-sdk/client-iottwinmaker 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-iottwinmaker
@@ -834,7 +834,7 @@ exports.deserializeAws_restJson1BatchPutPropertyValuesCommand = deserializeAws_r
834
834
  const deserializeAws_restJson1BatchPutPropertyValuesCommandError = async (output, context) => {
835
835
  const parsedOutput = {
836
836
  ...output,
837
- body: await parseBody(output.body, context),
837
+ body: await parseErrorBody(output.body, context),
838
838
  };
839
839
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
840
840
  switch (errorCode) {
@@ -883,7 +883,7 @@ exports.deserializeAws_restJson1CreateComponentTypeCommand = deserializeAws_rest
883
883
  const deserializeAws_restJson1CreateComponentTypeCommandError = async (output, context) => {
884
884
  const parsedOutput = {
885
885
  ...output,
886
- body: await parseBody(output.body, context),
886
+ body: await parseErrorBody(output.body, context),
887
887
  };
888
888
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
889
889
  switch (errorCode) {
@@ -941,7 +941,7 @@ exports.deserializeAws_restJson1CreateEntityCommand = deserializeAws_restJson1Cr
941
941
  const deserializeAws_restJson1CreateEntityCommandError = async (output, context) => {
942
942
  const parsedOutput = {
943
943
  ...output,
944
- body: await parseBody(output.body, context),
944
+ body: await parseErrorBody(output.body, context),
945
945
  };
946
946
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
947
947
  switch (errorCode) {
@@ -993,7 +993,7 @@ exports.deserializeAws_restJson1CreateSceneCommand = deserializeAws_restJson1Cre
993
993
  const deserializeAws_restJson1CreateSceneCommandError = async (output, context) => {
994
994
  const parsedOutput = {
995
995
  ...output,
996
- body: await parseBody(output.body, context),
996
+ body: await parseErrorBody(output.body, context),
997
997
  };
998
998
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
999
999
  switch (errorCode) {
@@ -1045,7 +1045,7 @@ exports.deserializeAws_restJson1CreateWorkspaceCommand = deserializeAws_restJson
1045
1045
  const deserializeAws_restJson1CreateWorkspaceCommandError = async (output, context) => {
1046
1046
  const parsedOutput = {
1047
1047
  ...output,
1048
- body: await parseBody(output.body, context),
1048
+ body: await parseErrorBody(output.body, context),
1049
1049
  };
1050
1050
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1051
1051
  switch (errorCode) {
@@ -1094,7 +1094,7 @@ exports.deserializeAws_restJson1DeleteComponentTypeCommand = deserializeAws_rest
1094
1094
  const deserializeAws_restJson1DeleteComponentTypeCommandError = async (output, context) => {
1095
1095
  const parsedOutput = {
1096
1096
  ...output,
1097
- body: await parseBody(output.body, context),
1097
+ body: await parseErrorBody(output.body, context),
1098
1098
  };
1099
1099
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1100
1100
  switch (errorCode) {
@@ -1140,7 +1140,7 @@ exports.deserializeAws_restJson1DeleteEntityCommand = deserializeAws_restJson1De
1140
1140
  const deserializeAws_restJson1DeleteEntityCommandError = async (output, context) => {
1141
1141
  const parsedOutput = {
1142
1142
  ...output,
1143
- body: await parseBody(output.body, context),
1143
+ body: await parseErrorBody(output.body, context),
1144
1144
  };
1145
1145
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1146
1146
  switch (errorCode) {
@@ -1183,7 +1183,7 @@ exports.deserializeAws_restJson1DeleteSceneCommand = deserializeAws_restJson1Del
1183
1183
  const deserializeAws_restJson1DeleteSceneCommandError = async (output, context) => {
1184
1184
  const parsedOutput = {
1185
1185
  ...output,
1186
- body: await parseBody(output.body, context),
1186
+ body: await parseErrorBody(output.body, context),
1187
1187
  };
1188
1188
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1189
1189
  switch (errorCode) {
@@ -1226,7 +1226,7 @@ exports.deserializeAws_restJson1DeleteWorkspaceCommand = deserializeAws_restJson
1226
1226
  const deserializeAws_restJson1DeleteWorkspaceCommandError = async (output, context) => {
1227
1227
  const parsedOutput = {
1228
1228
  ...output,
1229
- body: await parseBody(output.body, context),
1229
+ body: await parseErrorBody(output.body, context),
1230
1230
  };
1231
1231
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1232
1232
  switch (errorCode) {
@@ -1308,7 +1308,7 @@ exports.deserializeAws_restJson1GetComponentTypeCommand = deserializeAws_restJso
1308
1308
  const deserializeAws_restJson1GetComponentTypeCommandError = async (output, context) => {
1309
1309
  const parsedOutput = {
1310
1310
  ...output,
1311
- body: await parseBody(output.body, context),
1311
+ body: await parseErrorBody(output.body, context),
1312
1312
  };
1313
1313
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1314
1314
  switch (errorCode) {
@@ -1381,7 +1381,7 @@ exports.deserializeAws_restJson1GetEntityCommand = deserializeAws_restJson1GetEn
1381
1381
  const deserializeAws_restJson1GetEntityCommandError = async (output, context) => {
1382
1382
  const parsedOutput = {
1383
1383
  ...output,
1384
- body: await parseBody(output.body, context),
1384
+ body: await parseErrorBody(output.body, context),
1385
1385
  };
1386
1386
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1387
1387
  switch (errorCode) {
@@ -1427,7 +1427,7 @@ exports.deserializeAws_restJson1GetPropertyValueCommand = deserializeAws_restJso
1427
1427
  const deserializeAws_restJson1GetPropertyValueCommandError = async (output, context) => {
1428
1428
  const parsedOutput = {
1429
1429
  ...output,
1430
- body: await parseBody(output.body, context),
1430
+ body: await parseErrorBody(output.body, context),
1431
1431
  };
1432
1432
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1433
1433
  switch (errorCode) {
@@ -1482,7 +1482,7 @@ exports.deserializeAws_restJson1GetPropertyValueHistoryCommand = deserializeAws_
1482
1482
  const deserializeAws_restJson1GetPropertyValueHistoryCommandError = async (output, context) => {
1483
1483
  const parsedOutput = {
1484
1484
  ...output,
1485
- body: await parseBody(output.body, context),
1485
+ body: await parseErrorBody(output.body, context),
1486
1486
  };
1487
1487
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1488
1488
  switch (errorCode) {
@@ -1555,7 +1555,7 @@ exports.deserializeAws_restJson1GetSceneCommand = deserializeAws_restJson1GetSce
1555
1555
  const deserializeAws_restJson1GetSceneCommandError = async (output, context) => {
1556
1556
  const parsedOutput = {
1557
1557
  ...output,
1558
- body: await parseBody(output.body, context),
1558
+ body: await parseErrorBody(output.body, context),
1559
1559
  };
1560
1560
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1561
1561
  switch (errorCode) {
@@ -1619,7 +1619,7 @@ exports.deserializeAws_restJson1GetWorkspaceCommand = deserializeAws_restJson1Ge
1619
1619
  const deserializeAws_restJson1GetWorkspaceCommandError = async (output, context) => {
1620
1620
  const parsedOutput = {
1621
1621
  ...output,
1622
- body: await parseBody(output.body, context),
1622
+ body: await parseErrorBody(output.body, context),
1623
1623
  };
1624
1624
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1625
1625
  switch (errorCode) {
@@ -1674,7 +1674,7 @@ exports.deserializeAws_restJson1ListComponentTypesCommand = deserializeAws_restJ
1674
1674
  const deserializeAws_restJson1ListComponentTypesCommandError = async (output, context) => {
1675
1675
  const parsedOutput = {
1676
1676
  ...output,
1677
- body: await parseBody(output.body, context),
1677
+ body: await parseErrorBody(output.body, context),
1678
1678
  };
1679
1679
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1680
1680
  switch (errorCode) {
@@ -1720,7 +1720,7 @@ exports.deserializeAws_restJson1ListEntitiesCommand = deserializeAws_restJson1Li
1720
1720
  const deserializeAws_restJson1ListEntitiesCommandError = async (output, context) => {
1721
1721
  const parsedOutput = {
1722
1722
  ...output,
1723
- body: await parseBody(output.body, context),
1723
+ body: await parseErrorBody(output.body, context),
1724
1724
  };
1725
1725
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1726
1726
  switch (errorCode) {
@@ -1766,7 +1766,7 @@ exports.deserializeAws_restJson1ListScenesCommand = deserializeAws_restJson1List
1766
1766
  const deserializeAws_restJson1ListScenesCommandError = async (output, context) => {
1767
1767
  const parsedOutput = {
1768
1768
  ...output,
1769
- body: await parseBody(output.body, context),
1769
+ body: await parseErrorBody(output.body, context),
1770
1770
  };
1771
1771
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1772
1772
  switch (errorCode) {
@@ -1812,7 +1812,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
1812
1812
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
1813
1813
  const parsedOutput = {
1814
1814
  ...output,
1815
- body: await parseBody(output.body, context),
1815
+ body: await parseErrorBody(output.body, context),
1816
1816
  };
1817
1817
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1818
1818
  switch (errorCode) {
@@ -1852,7 +1852,7 @@ exports.deserializeAws_restJson1ListWorkspacesCommand = deserializeAws_restJson1
1852
1852
  const deserializeAws_restJson1ListWorkspacesCommandError = async (output, context) => {
1853
1853
  const parsedOutput = {
1854
1854
  ...output,
1855
- body: await parseBody(output.body, context),
1855
+ body: await parseErrorBody(output.body, context),
1856
1856
  };
1857
1857
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1858
1858
  switch (errorCode) {
@@ -1892,7 +1892,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
1892
1892
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
1893
1893
  const parsedOutput = {
1894
1894
  ...output,
1895
- body: await parseBody(output.body, context),
1895
+ body: await parseErrorBody(output.body, context),
1896
1896
  };
1897
1897
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1898
1898
  switch (errorCode) {
@@ -1929,7 +1929,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
1929
1929
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
1930
1930
  const parsedOutput = {
1931
1931
  ...output,
1932
- body: await parseBody(output.body, context),
1932
+ body: await parseErrorBody(output.body, context),
1933
1933
  };
1934
1934
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1935
1935
  switch (errorCode) {
@@ -1975,7 +1975,7 @@ exports.deserializeAws_restJson1UpdateComponentTypeCommand = deserializeAws_rest
1975
1975
  const deserializeAws_restJson1UpdateComponentTypeCommandError = async (output, context) => {
1976
1976
  const parsedOutput = {
1977
1977
  ...output,
1978
- body: await parseBody(output.body, context),
1978
+ body: await parseErrorBody(output.body, context),
1979
1979
  };
1980
1980
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1981
1981
  switch (errorCode) {
@@ -2027,7 +2027,7 @@ exports.deserializeAws_restJson1UpdateEntityCommand = deserializeAws_restJson1Up
2027
2027
  const deserializeAws_restJson1UpdateEntityCommandError = async (output, context) => {
2028
2028
  const parsedOutput = {
2029
2029
  ...output,
2030
- body: await parseBody(output.body, context),
2030
+ body: await parseErrorBody(output.body, context),
2031
2031
  };
2032
2032
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2033
2033
  switch (errorCode) {
@@ -2079,7 +2079,7 @@ exports.deserializeAws_restJson1UpdateSceneCommand = deserializeAws_restJson1Upd
2079
2079
  const deserializeAws_restJson1UpdateSceneCommandError = async (output, context) => {
2080
2080
  const parsedOutput = {
2081
2081
  ...output,
2082
- body: await parseBody(output.body, context),
2082
+ body: await parseErrorBody(output.body, context),
2083
2083
  };
2084
2084
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2085
2085
  switch (errorCode) {
@@ -2125,7 +2125,7 @@ exports.deserializeAws_restJson1UpdateWorkspaceCommand = deserializeAws_restJson
2125
2125
  const deserializeAws_restJson1UpdateWorkspaceCommandError = async (output, context) => {
2126
2126
  const parsedOutput = {
2127
2127
  ...output,
2128
- body: await parseBody(output.body, context),
2128
+ body: await parseErrorBody(output.body, context),
2129
2129
  };
2130
2130
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2131
2131
  switch (errorCode) {
@@ -3093,6 +3093,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
3093
3093
  }
3094
3094
  return {};
3095
3095
  });
3096
+ const parseErrorBody = async (errorBody, context) => {
3097
+ var _a;
3098
+ const value = await parseBody(errorBody, context);
3099
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
3100
+ return value;
3101
+ };
3096
3102
  const loadRestJsonErrorCode = (output, data) => {
3097
3103
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3098
3104
  const sanitizeErrorCode = (rawValue) => {
@@ -942,7 +942,7 @@ var deserializeAws_restJson1BatchPutPropertyValuesCommandError = function (outpu
942
942
  case 0:
943
943
  _a = [__assign({}, output)];
944
944
  _c = {};
945
- return [4, parseBody(output.body, context)];
945
+ return [4, parseErrorBody(output.body, context)];
946
946
  case 1:
947
947
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
948
948
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1016,7 +1016,7 @@ var deserializeAws_restJson1CreateComponentTypeCommandError = function (output,
1016
1016
  case 0:
1017
1017
  _a = [__assign({}, output)];
1018
1018
  _c = {};
1019
- return [4, parseBody(output.body, context)];
1019
+ return [4, parseErrorBody(output.body, context)];
1020
1020
  case 1:
1021
1021
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1022
1022
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1101,7 +1101,7 @@ var deserializeAws_restJson1CreateEntityCommandError = function (output, context
1101
1101
  case 0:
1102
1102
  _a = [__assign({}, output)];
1103
1103
  _c = {};
1104
- return [4, parseBody(output.body, context)];
1104
+ return [4, parseErrorBody(output.body, context)];
1105
1105
  case 1:
1106
1106
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1107
1107
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1180,7 +1180,7 @@ var deserializeAws_restJson1CreateSceneCommandError = function (output, context)
1180
1180
  case 0:
1181
1181
  _a = [__assign({}, output)];
1182
1182
  _c = {};
1183
- return [4, parseBody(output.body, context)];
1183
+ return [4, parseErrorBody(output.body, context)];
1184
1184
  case 1:
1185
1185
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1186
1186
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1259,7 +1259,7 @@ var deserializeAws_restJson1CreateWorkspaceCommandError = function (output, cont
1259
1259
  case 0:
1260
1260
  _a = [__assign({}, output)];
1261
1261
  _c = {};
1262
- return [4, parseBody(output.body, context)];
1262
+ return [4, parseErrorBody(output.body, context)];
1263
1263
  case 1:
1264
1264
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1265
1265
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1335,7 +1335,7 @@ var deserializeAws_restJson1DeleteComponentTypeCommandError = function (output,
1335
1335
  case 0:
1336
1336
  _a = [__assign({}, output)];
1337
1337
  _c = {};
1338
- return [4, parseBody(output.body, context)];
1338
+ return [4, parseErrorBody(output.body, context)];
1339
1339
  case 1:
1340
1340
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1341
1341
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1407,7 +1407,7 @@ var deserializeAws_restJson1DeleteEntityCommandError = function (output, context
1407
1407
  case 0:
1408
1408
  _a = [__assign({}, output)];
1409
1409
  _c = {};
1410
- return [4, parseBody(output.body, context)];
1410
+ return [4, parseErrorBody(output.body, context)];
1411
1411
  case 1:
1412
1412
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1413
1413
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1474,7 +1474,7 @@ var deserializeAws_restJson1DeleteSceneCommandError = function (output, context)
1474
1474
  case 0:
1475
1475
  _a = [__assign({}, output)];
1476
1476
  _c = {};
1477
- return [4, parseBody(output.body, context)];
1477
+ return [4, parseErrorBody(output.body, context)];
1478
1478
  case 1:
1479
1479
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1480
1480
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1541,7 +1541,7 @@ var deserializeAws_restJson1DeleteWorkspaceCommandError = function (output, cont
1541
1541
  case 0:
1542
1542
  _a = [__assign({}, output)];
1543
1543
  _c = {};
1544
- return [4, parseBody(output.body, context)];
1544
+ return [4, parseErrorBody(output.body, context)];
1545
1545
  case 1:
1546
1546
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1547
1547
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1649,7 +1649,7 @@ var deserializeAws_restJson1GetComponentTypeCommandError = function (output, con
1649
1649
  case 0:
1650
1650
  _a = [__assign({}, output)];
1651
1651
  _c = {};
1652
- return [4, parseBody(output.body, context)];
1652
+ return [4, parseErrorBody(output.body, context)];
1653
1653
  case 1:
1654
1654
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1655
1655
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1747,7 +1747,7 @@ var deserializeAws_restJson1GetEntityCommandError = function (output, context) {
1747
1747
  case 0:
1748
1748
  _a = [__assign({}, output)];
1749
1749
  _c = {};
1750
- return [4, parseBody(output.body, context)];
1750
+ return [4, parseErrorBody(output.body, context)];
1751
1751
  case 1:
1752
1752
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1753
1753
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1819,7 +1819,7 @@ var deserializeAws_restJson1GetPropertyValueCommandError = function (output, con
1819
1819
  case 0:
1820
1820
  _a = [__assign({}, output)];
1821
1821
  _c = {};
1822
- return [4, parseBody(output.body, context)];
1822
+ return [4, parseErrorBody(output.body, context)];
1823
1823
  case 1:
1824
1824
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1825
1825
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1902,7 +1902,7 @@ var deserializeAws_restJson1GetPropertyValueHistoryCommandError = function (outp
1902
1902
  case 0:
1903
1903
  _a = [__assign({}, output)];
1904
1904
  _c = {};
1905
- return [4, parseBody(output.body, context)];
1905
+ return [4, parseErrorBody(output.body, context)];
1906
1906
  case 1:
1907
1907
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1908
1908
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2003,7 +2003,7 @@ var deserializeAws_restJson1GetSceneCommandError = function (output, context) {
2003
2003
  case 0:
2004
2004
  _a = [__assign({}, output)];
2005
2005
  _c = {};
2006
- return [4, parseBody(output.body, context)];
2006
+ return [4, parseErrorBody(output.body, context)];
2007
2007
  case 1:
2008
2008
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2009
2009
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2093,7 +2093,7 @@ var deserializeAws_restJson1GetWorkspaceCommandError = function (output, context
2093
2093
  case 0:
2094
2094
  _a = [__assign({}, output)];
2095
2095
  _c = {};
2096
- return [4, parseBody(output.body, context)];
2096
+ return [4, parseErrorBody(output.body, context)];
2097
2097
  case 1:
2098
2098
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2099
2099
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2174,7 +2174,7 @@ var deserializeAws_restJson1ListComponentTypesCommandError = function (output, c
2174
2174
  case 0:
2175
2175
  _a = [__assign({}, output)];
2176
2176
  _c = {};
2177
- return [4, parseBody(output.body, context)];
2177
+ return [4, parseErrorBody(output.body, context)];
2178
2178
  case 1:
2179
2179
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2180
2180
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2245,7 +2245,7 @@ var deserializeAws_restJson1ListEntitiesCommandError = function (output, context
2245
2245
  case 0:
2246
2246
  _a = [__assign({}, output)];
2247
2247
  _c = {};
2248
- return [4, parseBody(output.body, context)];
2248
+ return [4, parseErrorBody(output.body, context)];
2249
2249
  case 1:
2250
2250
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2251
2251
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2316,7 +2316,7 @@ var deserializeAws_restJson1ListScenesCommandError = function (output, context)
2316
2316
  case 0:
2317
2317
  _a = [__assign({}, output)];
2318
2318
  _c = {};
2319
- return [4, parseBody(output.body, context)];
2319
+ return [4, parseErrorBody(output.body, context)];
2320
2320
  case 1:
2321
2321
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2322
2322
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2387,7 +2387,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
2387
2387
  case 0:
2388
2388
  _a = [__assign({}, output)];
2389
2389
  _c = {};
2390
- return [4, parseBody(output.body, context)];
2390
+ return [4, parseErrorBody(output.body, context)];
2391
2391
  case 1:
2392
2392
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2393
2393
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2450,7 +2450,7 @@ var deserializeAws_restJson1ListWorkspacesCommandError = function (output, conte
2450
2450
  case 0:
2451
2451
  _a = [__assign({}, output)];
2452
2452
  _c = {};
2453
- return [4, parseBody(output.body, context)];
2453
+ return [4, parseErrorBody(output.body, context)];
2454
2454
  case 1:
2455
2455
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2456
2456
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2513,7 +2513,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
2513
2513
  case 0:
2514
2514
  _a = [__assign({}, output)];
2515
2515
  _c = {};
2516
- return [4, parseBody(output.body, context)];
2516
+ return [4, parseErrorBody(output.body, context)];
2517
2517
  case 1:
2518
2518
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2519
2519
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2572,7 +2572,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
2572
2572
  case 0:
2573
2573
  _a = [__assign({}, output)];
2574
2574
  _c = {};
2575
- return [4, parseBody(output.body, context)];
2575
+ return [4, parseErrorBody(output.body, context)];
2576
2576
  case 1:
2577
2577
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2578
2578
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2641,7 +2641,7 @@ var deserializeAws_restJson1UpdateComponentTypeCommandError = function (output,
2641
2641
  case 0:
2642
2642
  _a = [__assign({}, output)];
2643
2643
  _c = {};
2644
- return [4, parseBody(output.body, context)];
2644
+ return [4, parseErrorBody(output.body, context)];
2645
2645
  case 1:
2646
2646
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2647
2647
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2720,7 +2720,7 @@ var deserializeAws_restJson1UpdateEntityCommandError = function (output, context
2720
2720
  case 0:
2721
2721
  _a = [__assign({}, output)];
2722
2722
  _c = {};
2723
- return [4, parseBody(output.body, context)];
2723
+ return [4, parseErrorBody(output.body, context)];
2724
2724
  case 1:
2725
2725
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2726
2726
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2800,7 +2800,7 @@ var deserializeAws_restJson1UpdateSceneCommandError = function (output, context)
2800
2800
  case 0:
2801
2801
  _a = [__assign({}, output)];
2802
2802
  _c = {};
2803
- return [4, parseBody(output.body, context)];
2803
+ return [4, parseErrorBody(output.body, context)];
2804
2804
  case 1:
2805
2805
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2806
2806
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2872,7 +2872,7 @@ var deserializeAws_restJson1UpdateWorkspaceCommandError = function (output, cont
2872
2872
  case 0:
2873
2873
  _a = [__assign({}, output)];
2874
2874
  _c = {};
2875
- return [4, parseBody(output.body, context)];
2875
+ return [4, parseErrorBody(output.body, context)];
2876
2876
  case 1:
2877
2877
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2878
2878
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3768,6 +3768,19 @@ var parseBody = function (streamBody, context) {
3768
3768
  return {};
3769
3769
  });
3770
3770
  };
3771
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
3772
+ var value;
3773
+ var _a;
3774
+ return __generator(this, function (_b) {
3775
+ switch (_b.label) {
3776
+ case 0: return [4, parseBody(errorBody, context)];
3777
+ case 1:
3778
+ value = _b.sent();
3779
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
3780
+ return [2, value];
3781
+ }
3782
+ });
3783
+ }); };
3771
3784
  var loadRestJsonErrorCode = function (output, data) {
3772
3785
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
3773
3786
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-iottwinmaker",
3
3
  "description": "AWS SDK for JavaScript Iottwinmaker 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",