@aws-sdk/client-codeguruprofiler 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-codeguruprofiler
@@ -567,7 +567,7 @@ exports.deserializeAws_restJson1AddNotificationChannelsCommand = deserializeAws_
567
567
  const deserializeAws_restJson1AddNotificationChannelsCommandError = async (output, context) => {
568
568
  const parsedOutput = {
569
569
  ...output,
570
- body: await parseBody(output.body, context),
570
+ body: await parseErrorBody(output.body, context),
571
571
  };
572
572
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
573
573
  switch (errorCode) {
@@ -631,7 +631,7 @@ exports.deserializeAws_restJson1BatchGetFrameMetricDataCommand = deserializeAws_
631
631
  const deserializeAws_restJson1BatchGetFrameMetricDataCommandError = async (output, context) => {
632
632
  const parsedOutput = {
633
633
  ...output,
634
- body: await parseBody(output.body, context),
634
+ body: await parseErrorBody(output.body, context),
635
635
  };
636
636
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
637
637
  switch (errorCode) {
@@ -672,7 +672,7 @@ exports.deserializeAws_restJson1ConfigureAgentCommand = deserializeAws_restJson1
672
672
  const deserializeAws_restJson1ConfigureAgentCommandError = async (output, context) => {
673
673
  const parsedOutput = {
674
674
  ...output,
675
- body: await parseBody(output.body, context),
675
+ body: await parseErrorBody(output.body, context),
676
676
  };
677
677
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
678
678
  switch (errorCode) {
@@ -713,7 +713,7 @@ exports.deserializeAws_restJson1CreateProfilingGroupCommand = deserializeAws_res
713
713
  const deserializeAws_restJson1CreateProfilingGroupCommandError = async (output, context) => {
714
714
  const parsedOutput = {
715
715
  ...output,
716
- body: await parseBody(output.body, context),
716
+ body: await parseErrorBody(output.body, context),
717
717
  };
718
718
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
719
719
  switch (errorCode) {
@@ -756,7 +756,7 @@ exports.deserializeAws_restJson1DeleteProfilingGroupCommand = deserializeAws_res
756
756
  const deserializeAws_restJson1DeleteProfilingGroupCommandError = async (output, context) => {
757
757
  const parsedOutput = {
758
758
  ...output,
759
- body: await parseBody(output.body, context),
759
+ body: await parseErrorBody(output.body, context),
760
760
  };
761
761
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
762
762
  switch (errorCode) {
@@ -800,7 +800,7 @@ exports.deserializeAws_restJson1DescribeProfilingGroupCommand = deserializeAws_r
800
800
  const deserializeAws_restJson1DescribeProfilingGroupCommandError = async (output, context) => {
801
801
  const parsedOutput = {
802
802
  ...output,
803
- body: await parseBody(output.body, context),
803
+ body: await parseErrorBody(output.body, context),
804
804
  };
805
805
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
806
806
  switch (errorCode) {
@@ -846,7 +846,7 @@ exports.deserializeAws_restJson1GetFindingsReportAccountSummaryCommand = deseria
846
846
  const deserializeAws_restJson1GetFindingsReportAccountSummaryCommandError = async (output, context) => {
847
847
  const parsedOutput = {
848
848
  ...output,
849
- body: await parseBody(output.body, context),
849
+ body: await parseErrorBody(output.body, context),
850
850
  };
851
851
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
852
852
  switch (errorCode) {
@@ -886,7 +886,7 @@ exports.deserializeAws_restJson1GetNotificationConfigurationCommand = deserializ
886
886
  const deserializeAws_restJson1GetNotificationConfigurationCommandError = async (output, context) => {
887
887
  const parsedOutput = {
888
888
  ...output,
889
- body: await parseBody(output.body, context),
889
+ body: await parseErrorBody(output.body, context),
890
890
  };
891
891
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
892
892
  switch (errorCode) {
@@ -932,7 +932,7 @@ exports.deserializeAws_restJson1GetPolicyCommand = deserializeAws_restJson1GetPo
932
932
  const deserializeAws_restJson1GetPolicyCommandError = async (output, context) => {
933
933
  const parsedOutput = {
934
934
  ...output,
935
- body: await parseBody(output.body, context),
935
+ body: await parseErrorBody(output.body, context),
936
936
  };
937
937
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
938
938
  switch (errorCode) {
@@ -972,7 +972,7 @@ exports.deserializeAws_restJson1GetProfileCommand = deserializeAws_restJson1GetP
972
972
  const deserializeAws_restJson1GetProfileCommandError = async (output, context) => {
973
973
  const parsedOutput = {
974
974
  ...output,
975
- body: await parseBody(output.body, context),
975
+ body: await parseErrorBody(output.body, context),
976
976
  };
977
977
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
978
978
  switch (errorCode) {
@@ -1027,7 +1027,7 @@ exports.deserializeAws_restJson1GetRecommendationsCommand = deserializeAws_restJ
1027
1027
  const deserializeAws_restJson1GetRecommendationsCommandError = async (output, context) => {
1028
1028
  const parsedOutput = {
1029
1029
  ...output,
1030
- body: await parseBody(output.body, context),
1030
+ body: await parseErrorBody(output.body, context),
1031
1031
  };
1032
1032
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1033
1033
  switch (errorCode) {
@@ -1073,7 +1073,7 @@ exports.deserializeAws_restJson1ListFindingsReportsCommand = deserializeAws_rest
1073
1073
  const deserializeAws_restJson1ListFindingsReportsCommandError = async (output, context) => {
1074
1074
  const parsedOutput = {
1075
1075
  ...output,
1076
- body: await parseBody(output.body, context),
1076
+ body: await parseErrorBody(output.body, context),
1077
1077
  };
1078
1078
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1079
1079
  switch (errorCode) {
@@ -1119,7 +1119,7 @@ exports.deserializeAws_restJson1ListProfileTimesCommand = deserializeAws_restJso
1119
1119
  const deserializeAws_restJson1ListProfileTimesCommandError = async (output, context) => {
1120
1120
  const parsedOutput = {
1121
1121
  ...output,
1122
- body: await parseBody(output.body, context),
1122
+ body: await parseErrorBody(output.body, context),
1123
1123
  };
1124
1124
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1125
1125
  switch (errorCode) {
@@ -1168,7 +1168,7 @@ exports.deserializeAws_restJson1ListProfilingGroupsCommand = deserializeAws_rest
1168
1168
  const deserializeAws_restJson1ListProfilingGroupsCommandError = async (output, context) => {
1169
1169
  const parsedOutput = {
1170
1170
  ...output,
1171
- body: await parseBody(output.body, context),
1171
+ body: await parseErrorBody(output.body, context),
1172
1172
  };
1173
1173
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1174
1174
  switch (errorCode) {
@@ -1205,7 +1205,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
1205
1205
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
1206
1206
  const parsedOutput = {
1207
1207
  ...output,
1208
- body: await parseBody(output.body, context),
1208
+ body: await parseErrorBody(output.body, context),
1209
1209
  };
1210
1210
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1211
1211
  switch (errorCode) {
@@ -1242,7 +1242,7 @@ exports.deserializeAws_restJson1PostAgentProfileCommand = deserializeAws_restJso
1242
1242
  const deserializeAws_restJson1PostAgentProfileCommandError = async (output, context) => {
1243
1243
  const parsedOutput = {
1244
1244
  ...output,
1245
- body: await parseBody(output.body, context),
1245
+ body: await parseErrorBody(output.body, context),
1246
1246
  };
1247
1247
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1248
1248
  switch (errorCode) {
@@ -1288,7 +1288,7 @@ exports.deserializeAws_restJson1PutPermissionCommand = deserializeAws_restJson1P
1288
1288
  const deserializeAws_restJson1PutPermissionCommandError = async (output, context) => {
1289
1289
  const parsedOutput = {
1290
1290
  ...output,
1291
- body: await parseBody(output.body, context),
1291
+ body: await parseErrorBody(output.body, context),
1292
1292
  };
1293
1293
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1294
1294
  switch (errorCode) {
@@ -1334,7 +1334,7 @@ exports.deserializeAws_restJson1RemoveNotificationChannelCommand = deserializeAw
1334
1334
  const deserializeAws_restJson1RemoveNotificationChannelCommandError = async (output, context) => {
1335
1335
  const parsedOutput = {
1336
1336
  ...output,
1337
- body: await parseBody(output.body, context),
1337
+ body: await parseErrorBody(output.body, context),
1338
1338
  };
1339
1339
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1340
1340
  switch (errorCode) {
@@ -1380,7 +1380,7 @@ exports.deserializeAws_restJson1RemovePermissionCommand = deserializeAws_restJso
1380
1380
  const deserializeAws_restJson1RemovePermissionCommandError = async (output, context) => {
1381
1381
  const parsedOutput = {
1382
1382
  ...output,
1383
- body: await parseBody(output.body, context),
1383
+ body: await parseErrorBody(output.body, context),
1384
1384
  };
1385
1385
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1386
1386
  switch (errorCode) {
@@ -1423,7 +1423,7 @@ exports.deserializeAws_restJson1SubmitFeedbackCommand = deserializeAws_restJson1
1423
1423
  const deserializeAws_restJson1SubmitFeedbackCommandError = async (output, context) => {
1424
1424
  const parsedOutput = {
1425
1425
  ...output,
1426
- body: await parseBody(output.body, context),
1426
+ body: await parseErrorBody(output.body, context),
1427
1427
  };
1428
1428
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1429
1429
  switch (errorCode) {
@@ -1463,7 +1463,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
1463
1463
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
1464
1464
  const parsedOutput = {
1465
1465
  ...output,
1466
- body: await parseBody(output.body, context),
1466
+ body: await parseErrorBody(output.body, context),
1467
1467
  };
1468
1468
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1469
1469
  switch (errorCode) {
@@ -1500,7 +1500,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
1500
1500
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
1501
1501
  const parsedOutput = {
1502
1502
  ...output,
1503
- body: await parseBody(output.body, context),
1503
+ body: await parseErrorBody(output.body, context),
1504
1504
  };
1505
1505
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1506
1506
  switch (errorCode) {
@@ -1538,7 +1538,7 @@ exports.deserializeAws_restJson1UpdateProfilingGroupCommand = deserializeAws_res
1538
1538
  const deserializeAws_restJson1UpdateProfilingGroupCommandError = async (output, context) => {
1539
1539
  const parsedOutput = {
1540
1540
  ...output,
1541
- body: await parseBody(output.body, context),
1541
+ body: await parseErrorBody(output.body, context),
1542
1542
  };
1543
1543
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1544
1544
  switch (errorCode) {
@@ -2119,6 +2119,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
2119
2119
  }
2120
2120
  return {};
2121
2121
  });
2122
+ const parseErrorBody = async (errorBody, context) => {
2123
+ var _a;
2124
+ const value = await parseBody(errorBody, context);
2125
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2126
+ return value;
2127
+ };
2122
2128
  const loadRestJsonErrorCode = (output, data) => {
2123
2129
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2124
2130
  const sanitizeErrorCode = (rawValue) => {
@@ -672,7 +672,7 @@ var deserializeAws_restJson1AddNotificationChannelsCommandError = function (outp
672
672
  case 0:
673
673
  _a = [__assign({}, output)];
674
674
  _c = {};
675
- return [4, parseBody(output.body, context)];
675
+ return [4, parseErrorBody(output.body, context)];
676
676
  case 1:
677
677
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
678
678
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -763,7 +763,7 @@ var deserializeAws_restJson1BatchGetFrameMetricDataCommandError = function (outp
763
763
  case 0:
764
764
  _a = [__assign({}, output)];
765
765
  _c = {};
766
- return [4, parseBody(output.body, context)];
766
+ return [4, parseErrorBody(output.body, context)];
767
767
  case 1:
768
768
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
769
769
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -828,7 +828,7 @@ var deserializeAws_restJson1ConfigureAgentCommandError = function (output, conte
828
828
  case 0:
829
829
  _a = [__assign({}, output)];
830
830
  _c = {};
831
- return [4, parseBody(output.body, context)];
831
+ return [4, parseErrorBody(output.body, context)];
832
832
  case 1:
833
833
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
834
834
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -893,7 +893,7 @@ var deserializeAws_restJson1CreateProfilingGroupCommandError = function (output,
893
893
  case 0:
894
894
  _a = [__assign({}, output)];
895
895
  _c = {};
896
- return [4, parseBody(output.body, context)];
896
+ return [4, parseErrorBody(output.body, context)];
897
897
  case 1:
898
898
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
899
899
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -960,7 +960,7 @@ var deserializeAws_restJson1DeleteProfilingGroupCommandError = function (output,
960
960
  case 0:
961
961
  _a = [__assign({}, output)];
962
962
  _c = {};
963
- return [4, parseBody(output.body, context)];
963
+ return [4, parseErrorBody(output.body, context)];
964
964
  case 1:
965
965
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
966
966
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1029,7 +1029,7 @@ var deserializeAws_restJson1DescribeProfilingGroupCommandError = function (outpu
1029
1029
  case 0:
1030
1030
  _a = [__assign({}, output)];
1031
1031
  _c = {};
1032
- return [4, parseBody(output.body, context)];
1032
+ return [4, parseErrorBody(output.body, context)];
1033
1033
  case 1:
1034
1034
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1035
1035
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1100,7 +1100,7 @@ var deserializeAws_restJson1GetFindingsReportAccountSummaryCommandError = functi
1100
1100
  case 0:
1101
1101
  _a = [__assign({}, output)];
1102
1102
  _c = {};
1103
- return [4, parseBody(output.body, context)];
1103
+ return [4, parseErrorBody(output.body, context)];
1104
1104
  case 1:
1105
1105
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1106
1106
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1164,7 +1164,7 @@ var deserializeAws_restJson1GetNotificationConfigurationCommandError = function
1164
1164
  case 0:
1165
1165
  _a = [__assign({}, output)];
1166
1166
  _c = {};
1167
- return [4, parseBody(output.body, context)];
1167
+ return [4, parseErrorBody(output.body, context)];
1168
1168
  case 1:
1169
1169
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1170
1170
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1235,7 +1235,7 @@ var deserializeAws_restJson1GetPolicyCommandError = function (output, context) {
1235
1235
  case 0:
1236
1236
  _a = [__assign({}, output)];
1237
1237
  _c = {};
1238
- return [4, parseBody(output.body, context)];
1238
+ return [4, parseErrorBody(output.body, context)];
1239
1239
  case 1:
1240
1240
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1241
1241
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1297,7 +1297,7 @@ var deserializeAws_restJson1GetProfileCommandError = function (output, context)
1297
1297
  case 0:
1298
1298
  _a = [__assign({}, output)];
1299
1299
  _c = {};
1300
- return [4, parseBody(output.body, context)];
1300
+ return [4, parseErrorBody(output.body, context)];
1301
1301
  case 1:
1302
1302
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1303
1303
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1377,7 +1377,7 @@ var deserializeAws_restJson1GetRecommendationsCommandError = function (output, c
1377
1377
  case 0:
1378
1378
  _a = [__assign({}, output)];
1379
1379
  _c = {};
1380
- return [4, parseBody(output.body, context)];
1380
+ return [4, parseErrorBody(output.body, context)];
1381
1381
  case 1:
1382
1382
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1383
1383
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1448,7 +1448,7 @@ var deserializeAws_restJson1ListFindingsReportsCommandError = function (output,
1448
1448
  case 0:
1449
1449
  _a = [__assign({}, output)];
1450
1450
  _c = {};
1451
- return [4, parseBody(output.body, context)];
1451
+ return [4, parseErrorBody(output.body, context)];
1452
1452
  case 1:
1453
1453
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1454
1454
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1519,7 +1519,7 @@ var deserializeAws_restJson1ListProfileTimesCommandError = function (output, con
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);
@@ -1593,7 +1593,7 @@ var deserializeAws_restJson1ListProfilingGroupsCommandError = function (output,
1593
1593
  case 0:
1594
1594
  _a = [__assign({}, output)];
1595
1595
  _c = {};
1596
- return [4, parseBody(output.body, context)];
1596
+ return [4, parseErrorBody(output.body, context)];
1597
1597
  case 1:
1598
1598
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1599
1599
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1653,7 +1653,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
1653
1653
  case 0:
1654
1654
  _a = [__assign({}, output)];
1655
1655
  _c = {};
1656
- return [4, parseBody(output.body, context)];
1656
+ return [4, parseErrorBody(output.body, context)];
1657
1657
  case 1:
1658
1658
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1659
1659
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1712,7 +1712,7 @@ var deserializeAws_restJson1PostAgentProfileCommandError = function (output, con
1712
1712
  case 0:
1713
1713
  _a = [__assign({}, output)];
1714
1714
  _c = {};
1715
- return [4, parseBody(output.body, context)];
1715
+ return [4, parseErrorBody(output.body, context)];
1716
1716
  case 1:
1717
1717
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1718
1718
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1783,7 +1783,7 @@ var deserializeAws_restJson1PutPermissionCommandError = function (output, contex
1783
1783
  case 0:
1784
1784
  _a = [__assign({}, output)];
1785
1785
  _c = {};
1786
- return [4, parseBody(output.body, context)];
1786
+ return [4, parseErrorBody(output.body, context)];
1787
1787
  case 1:
1788
1788
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1789
1789
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1855,7 +1855,7 @@ var deserializeAws_restJson1RemoveNotificationChannelCommandError = function (ou
1855
1855
  case 0:
1856
1856
  _a = [__assign({}, output)];
1857
1857
  _c = {};
1858
- return [4, parseBody(output.body, context)];
1858
+ return [4, parseErrorBody(output.body, context)];
1859
1859
  case 1:
1860
1860
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1861
1861
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1926,7 +1926,7 @@ var deserializeAws_restJson1RemovePermissionCommandError = function (output, con
1926
1926
  case 0:
1927
1927
  _a = [__assign({}, output)];
1928
1928
  _c = {};
1929
- return [4, parseBody(output.body, context)];
1929
+ return [4, parseErrorBody(output.body, context)];
1930
1930
  case 1:
1931
1931
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1932
1932
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1993,7 +1993,7 @@ var deserializeAws_restJson1SubmitFeedbackCommandError = function (output, conte
1993
1993
  case 0:
1994
1994
  _a = [__assign({}, output)];
1995
1995
  _c = {};
1996
- return [4, parseBody(output.body, context)];
1996
+ return [4, parseErrorBody(output.body, context)];
1997
1997
  case 1:
1998
1998
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1999
1999
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2056,7 +2056,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
2056
2056
  case 0:
2057
2057
  _a = [__assign({}, output)];
2058
2058
  _c = {};
2059
- return [4, parseBody(output.body, context)];
2059
+ return [4, parseErrorBody(output.body, context)];
2060
2060
  case 1:
2061
2061
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2062
2062
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2115,7 +2115,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
2115
2115
  case 0:
2116
2116
  _a = [__assign({}, output)];
2117
2117
  _c = {};
2118
- return [4, parseBody(output.body, context)];
2118
+ return [4, parseErrorBody(output.body, context)];
2119
2119
  case 1:
2120
2120
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2121
2121
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2176,7 +2176,7 @@ var deserializeAws_restJson1UpdateProfilingGroupCommandError = function (output,
2176
2176
  case 0:
2177
2177
  _a = [__assign({}, output)];
2178
2178
  _c = {};
2179
- return [4, parseBody(output.body, context)];
2179
+ return [4, parseErrorBody(output.body, context)];
2180
2180
  case 1:
2181
2181
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2182
2182
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2761,6 +2761,19 @@ var parseBody = function (streamBody, context) {
2761
2761
  return {};
2762
2762
  });
2763
2763
  };
2764
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
2765
+ var value;
2766
+ var _a;
2767
+ return __generator(this, function (_b) {
2768
+ switch (_b.label) {
2769
+ case 0: return [4, parseBody(errorBody, context)];
2770
+ case 1:
2771
+ value = _b.sent();
2772
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2773
+ return [2, value];
2774
+ }
2775
+ });
2776
+ }); };
2764
2777
  var loadRestJsonErrorCode = function (output, data) {
2765
2778
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2766
2779
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-codeguruprofiler",
3
3
  "description": "AWS SDK for JavaScript Codeguruprofiler 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",