@aws-sdk/client-rolesanywhere 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-rolesanywhere
@@ -545,7 +545,7 @@ exports.deserializeAws_restJson1CreateProfileCommand = deserializeAws_restJson1C
545
545
  const deserializeAws_restJson1CreateProfileCommandError = async (output, context) => {
546
546
  const parsedOutput = {
547
547
  ...output,
548
- body: await parseBody(output.body, context),
548
+ body: await parseErrorBody(output.body, context),
549
549
  };
550
550
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
551
551
  switch (errorCode) {
@@ -582,7 +582,7 @@ exports.deserializeAws_restJson1CreateTrustAnchorCommand = deserializeAws_restJs
582
582
  const deserializeAws_restJson1CreateTrustAnchorCommandError = async (output, context) => {
583
583
  const parsedOutput = {
584
584
  ...output,
585
- body: await parseBody(output.body, context),
585
+ body: await parseErrorBody(output.body, context),
586
586
  };
587
587
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
588
588
  switch (errorCode) {
@@ -619,7 +619,7 @@ exports.deserializeAws_restJson1DeleteCrlCommand = deserializeAws_restJson1Delet
619
619
  const deserializeAws_restJson1DeleteCrlCommandError = async (output, context) => {
620
620
  const parsedOutput = {
621
621
  ...output,
622
- body: await parseBody(output.body, context),
622
+ body: await parseErrorBody(output.body, context),
623
623
  };
624
624
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
625
625
  switch (errorCode) {
@@ -656,7 +656,7 @@ exports.deserializeAws_restJson1DeleteProfileCommand = deserializeAws_restJson1D
656
656
  const deserializeAws_restJson1DeleteProfileCommandError = async (output, context) => {
657
657
  const parsedOutput = {
658
658
  ...output,
659
- body: await parseBody(output.body, context),
659
+ body: await parseErrorBody(output.body, context),
660
660
  };
661
661
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
662
662
  switch (errorCode) {
@@ -693,7 +693,7 @@ exports.deserializeAws_restJson1DeleteTrustAnchorCommand = deserializeAws_restJs
693
693
  const deserializeAws_restJson1DeleteTrustAnchorCommandError = async (output, context) => {
694
694
  const parsedOutput = {
695
695
  ...output,
696
- body: await parseBody(output.body, context),
696
+ body: await parseErrorBody(output.body, context),
697
697
  };
698
698
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
699
699
  switch (errorCode) {
@@ -730,7 +730,7 @@ exports.deserializeAws_restJson1DisableCrlCommand = deserializeAws_restJson1Disa
730
730
  const deserializeAws_restJson1DisableCrlCommandError = async (output, context) => {
731
731
  const parsedOutput = {
732
732
  ...output,
733
- body: await parseBody(output.body, context),
733
+ body: await parseErrorBody(output.body, context),
734
734
  };
735
735
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
736
736
  switch (errorCode) {
@@ -767,7 +767,7 @@ exports.deserializeAws_restJson1DisableProfileCommand = deserializeAws_restJson1
767
767
  const deserializeAws_restJson1DisableProfileCommandError = async (output, context) => {
768
768
  const parsedOutput = {
769
769
  ...output,
770
- body: await parseBody(output.body, context),
770
+ body: await parseErrorBody(output.body, context),
771
771
  };
772
772
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
773
773
  switch (errorCode) {
@@ -804,7 +804,7 @@ exports.deserializeAws_restJson1DisableTrustAnchorCommand = deserializeAws_restJ
804
804
  const deserializeAws_restJson1DisableTrustAnchorCommandError = async (output, context) => {
805
805
  const parsedOutput = {
806
806
  ...output,
807
- body: await parseBody(output.body, context),
807
+ body: await parseErrorBody(output.body, context),
808
808
  };
809
809
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
810
810
  switch (errorCode) {
@@ -841,7 +841,7 @@ exports.deserializeAws_restJson1EnableCrlCommand = deserializeAws_restJson1Enabl
841
841
  const deserializeAws_restJson1EnableCrlCommandError = async (output, context) => {
842
842
  const parsedOutput = {
843
843
  ...output,
844
- body: await parseBody(output.body, context),
844
+ body: await parseErrorBody(output.body, context),
845
845
  };
846
846
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
847
847
  switch (errorCode) {
@@ -878,7 +878,7 @@ exports.deserializeAws_restJson1EnableProfileCommand = deserializeAws_restJson1E
878
878
  const deserializeAws_restJson1EnableProfileCommandError = async (output, context) => {
879
879
  const parsedOutput = {
880
880
  ...output,
881
- body: await parseBody(output.body, context),
881
+ body: await parseErrorBody(output.body, context),
882
882
  };
883
883
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
884
884
  switch (errorCode) {
@@ -915,7 +915,7 @@ exports.deserializeAws_restJson1EnableTrustAnchorCommand = deserializeAws_restJs
915
915
  const deserializeAws_restJson1EnableTrustAnchorCommandError = async (output, context) => {
916
916
  const parsedOutput = {
917
917
  ...output,
918
- body: await parseBody(output.body, context),
918
+ body: await parseErrorBody(output.body, context),
919
919
  };
920
920
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
921
921
  switch (errorCode) {
@@ -952,7 +952,7 @@ exports.deserializeAws_restJson1GetCrlCommand = deserializeAws_restJson1GetCrlCo
952
952
  const deserializeAws_restJson1GetCrlCommandError = async (output, context) => {
953
953
  const parsedOutput = {
954
954
  ...output,
955
- body: await parseBody(output.body, context),
955
+ body: await parseErrorBody(output.body, context),
956
956
  };
957
957
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
958
958
  switch (errorCode) {
@@ -986,7 +986,7 @@ exports.deserializeAws_restJson1GetProfileCommand = deserializeAws_restJson1GetP
986
986
  const deserializeAws_restJson1GetProfileCommandError = async (output, context) => {
987
987
  const parsedOutput = {
988
988
  ...output,
989
- body: await parseBody(output.body, context),
989
+ body: await parseErrorBody(output.body, context),
990
990
  };
991
991
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
992
992
  switch (errorCode) {
@@ -1023,7 +1023,7 @@ exports.deserializeAws_restJson1GetSubjectCommand = deserializeAws_restJson1GetS
1023
1023
  const deserializeAws_restJson1GetSubjectCommandError = async (output, context) => {
1024
1024
  const parsedOutput = {
1025
1025
  ...output,
1026
- body: await parseBody(output.body, context),
1026
+ body: await parseErrorBody(output.body, context),
1027
1027
  };
1028
1028
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1029
1029
  switch (errorCode) {
@@ -1060,7 +1060,7 @@ exports.deserializeAws_restJson1GetTrustAnchorCommand = deserializeAws_restJson1
1060
1060
  const deserializeAws_restJson1GetTrustAnchorCommandError = async (output, context) => {
1061
1061
  const parsedOutput = {
1062
1062
  ...output,
1063
- body: await parseBody(output.body, context),
1063
+ body: await parseErrorBody(output.body, context),
1064
1064
  };
1065
1065
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1066
1066
  switch (errorCode) {
@@ -1100,7 +1100,7 @@ exports.deserializeAws_restJson1ImportCrlCommand = deserializeAws_restJson1Impor
1100
1100
  const deserializeAws_restJson1ImportCrlCommandError = async (output, context) => {
1101
1101
  const parsedOutput = {
1102
1102
  ...output,
1103
- body: await parseBody(output.body, context),
1103
+ body: await parseErrorBody(output.body, context),
1104
1104
  };
1105
1105
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1106
1106
  switch (errorCode) {
@@ -1140,7 +1140,7 @@ exports.deserializeAws_restJson1ListCrlsCommand = deserializeAws_restJson1ListCr
1140
1140
  const deserializeAws_restJson1ListCrlsCommandError = 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) {
@@ -1180,7 +1180,7 @@ exports.deserializeAws_restJson1ListProfilesCommand = deserializeAws_restJson1Li
1180
1180
  const deserializeAws_restJson1ListProfilesCommandError = async (output, context) => {
1181
1181
  const parsedOutput = {
1182
1182
  ...output,
1183
- body: await parseBody(output.body, context),
1183
+ body: await parseErrorBody(output.body, context),
1184
1184
  };
1185
1185
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1186
1186
  switch (errorCode) {
@@ -1220,7 +1220,7 @@ exports.deserializeAws_restJson1ListSubjectsCommand = deserializeAws_restJson1Li
1220
1220
  const deserializeAws_restJson1ListSubjectsCommandError = async (output, context) => {
1221
1221
  const parsedOutput = {
1222
1222
  ...output,
1223
- body: await parseBody(output.body, context),
1223
+ body: await parseErrorBody(output.body, context),
1224
1224
  };
1225
1225
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1226
1226
  switch (errorCode) {
@@ -1257,7 +1257,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
1257
1257
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
1258
1258
  const parsedOutput = {
1259
1259
  ...output,
1260
- body: await parseBody(output.body, context),
1260
+ body: await parseErrorBody(output.body, context),
1261
1261
  };
1262
1262
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1263
1263
  switch (errorCode) {
@@ -1300,7 +1300,7 @@ exports.deserializeAws_restJson1ListTrustAnchorsCommand = deserializeAws_restJso
1300
1300
  const deserializeAws_restJson1ListTrustAnchorsCommandError = async (output, context) => {
1301
1301
  const parsedOutput = {
1302
1302
  ...output,
1303
- body: await parseBody(output.body, context),
1303
+ body: await parseErrorBody(output.body, context),
1304
1304
  };
1305
1305
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1306
1306
  switch (errorCode) {
@@ -1334,7 +1334,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
1334
1334
  const deserializeAws_restJson1TagResourceCommandError = 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) {
@@ -1374,7 +1374,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
1374
1374
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
1375
1375
  const parsedOutput = {
1376
1376
  ...output,
1377
- body: await parseBody(output.body, context),
1377
+ body: await parseErrorBody(output.body, context),
1378
1378
  };
1379
1379
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1380
1380
  switch (errorCode) {
@@ -1414,7 +1414,7 @@ exports.deserializeAws_restJson1UpdateCrlCommand = deserializeAws_restJson1Updat
1414
1414
  const deserializeAws_restJson1UpdateCrlCommandError = async (output, context) => {
1415
1415
  const parsedOutput = {
1416
1416
  ...output,
1417
- body: await parseBody(output.body, context),
1417
+ body: await parseErrorBody(output.body, context),
1418
1418
  };
1419
1419
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1420
1420
  switch (errorCode) {
@@ -1454,7 +1454,7 @@ exports.deserializeAws_restJson1UpdateProfileCommand = deserializeAws_restJson1U
1454
1454
  const deserializeAws_restJson1UpdateProfileCommandError = async (output, context) => {
1455
1455
  const parsedOutput = {
1456
1456
  ...output,
1457
- body: await parseBody(output.body, context),
1457
+ body: await parseErrorBody(output.body, context),
1458
1458
  };
1459
1459
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1460
1460
  switch (errorCode) {
@@ -1494,7 +1494,7 @@ exports.deserializeAws_restJson1UpdateTrustAnchorCommand = deserializeAws_restJs
1494
1494
  const deserializeAws_restJson1UpdateTrustAnchorCommandError = async (output, context) => {
1495
1495
  const parsedOutput = {
1496
1496
  ...output,
1497
- body: await parseBody(output.body, context),
1497
+ body: await parseErrorBody(output.body, context),
1498
1498
  };
1499
1499
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1500
1500
  switch (errorCode) {
@@ -1857,6 +1857,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
1857
1857
  }
1858
1858
  return {};
1859
1859
  });
1860
+ const parseErrorBody = async (errorBody, context) => {
1861
+ var _a;
1862
+ const value = await parseBody(errorBody, context);
1863
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1864
+ return value;
1865
+ };
1860
1866
  const loadRestJsonErrorCode = (output, data) => {
1861
1867
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1862
1868
  const sanitizeErrorCode = (rawValue) => {
@@ -648,7 +648,7 @@ var deserializeAws_restJson1CreateProfileCommandError = function (output, contex
648
648
  case 0:
649
649
  _a = [__assign({}, output)];
650
650
  _c = {};
651
- return [4, parseBody(output.body, context)];
651
+ return [4, parseErrorBody(output.body, context)];
652
652
  case 1:
653
653
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
654
654
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -708,7 +708,7 @@ var deserializeAws_restJson1CreateTrustAnchorCommandError = function (output, co
708
708
  case 0:
709
709
  _a = [__assign({}, output)];
710
710
  _c = {};
711
- return [4, parseBody(output.body, context)];
711
+ return [4, parseErrorBody(output.body, context)];
712
712
  case 1:
713
713
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
714
714
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -768,7 +768,7 @@ var deserializeAws_restJson1DeleteCrlCommandError = function (output, context) {
768
768
  case 0:
769
769
  _a = [__assign({}, output)];
770
770
  _c = {};
771
- return [4, parseBody(output.body, context)];
771
+ return [4, parseErrorBody(output.body, context)];
772
772
  case 1:
773
773
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
774
774
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -828,7 +828,7 @@ var deserializeAws_restJson1DeleteProfileCommandError = function (output, contex
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);
@@ -888,7 +888,7 @@ var deserializeAws_restJson1DeleteTrustAnchorCommandError = function (output, co
888
888
  case 0:
889
889
  _a = [__assign({}, output)];
890
890
  _c = {};
891
- return [4, parseBody(output.body, context)];
891
+ return [4, parseErrorBody(output.body, context)];
892
892
  case 1:
893
893
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
894
894
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -948,7 +948,7 @@ var deserializeAws_restJson1DisableCrlCommandError = function (output, context)
948
948
  case 0:
949
949
  _a = [__assign({}, output)];
950
950
  _c = {};
951
- return [4, parseBody(output.body, context)];
951
+ return [4, parseErrorBody(output.body, context)];
952
952
  case 1:
953
953
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
954
954
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1008,7 +1008,7 @@ var deserializeAws_restJson1DisableProfileCommandError = function (output, conte
1008
1008
  case 0:
1009
1009
  _a = [__assign({}, output)];
1010
1010
  _c = {};
1011
- return [4, parseBody(output.body, context)];
1011
+ return [4, parseErrorBody(output.body, context)];
1012
1012
  case 1:
1013
1013
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1014
1014
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1068,7 +1068,7 @@ var deserializeAws_restJson1DisableTrustAnchorCommandError = function (output, c
1068
1068
  case 0:
1069
1069
  _a = [__assign({}, output)];
1070
1070
  _c = {};
1071
- return [4, parseBody(output.body, context)];
1071
+ return [4, parseErrorBody(output.body, context)];
1072
1072
  case 1:
1073
1073
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1074
1074
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1128,7 +1128,7 @@ var deserializeAws_restJson1EnableCrlCommandError = function (output, context) {
1128
1128
  case 0:
1129
1129
  _a = [__assign({}, output)];
1130
1130
  _c = {};
1131
- return [4, parseBody(output.body, context)];
1131
+ return [4, parseErrorBody(output.body, context)];
1132
1132
  case 1:
1133
1133
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1134
1134
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1188,7 +1188,7 @@ var deserializeAws_restJson1EnableProfileCommandError = function (output, contex
1188
1188
  case 0:
1189
1189
  _a = [__assign({}, output)];
1190
1190
  _c = {};
1191
- return [4, parseBody(output.body, context)];
1191
+ return [4, parseErrorBody(output.body, context)];
1192
1192
  case 1:
1193
1193
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1194
1194
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1248,7 +1248,7 @@ var deserializeAws_restJson1EnableTrustAnchorCommandError = function (output, co
1248
1248
  case 0:
1249
1249
  _a = [__assign({}, output)];
1250
1250
  _c = {};
1251
- return [4, parseBody(output.body, context)];
1251
+ return [4, parseErrorBody(output.body, context)];
1252
1252
  case 1:
1253
1253
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1254
1254
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1308,7 +1308,7 @@ var deserializeAws_restJson1GetCrlCommandError = function (output, context) { re
1308
1308
  case 0:
1309
1309
  _a = [__assign({}, output)];
1310
1310
  _c = {};
1311
- return [4, parseBody(output.body, context)];
1311
+ return [4, parseErrorBody(output.body, context)];
1312
1312
  case 1:
1313
1313
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1314
1314
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1364,7 +1364,7 @@ var deserializeAws_restJson1GetProfileCommandError = function (output, context)
1364
1364
  case 0:
1365
1365
  _a = [__assign({}, output)];
1366
1366
  _c = {};
1367
- return [4, parseBody(output.body, context)];
1367
+ return [4, parseErrorBody(output.body, context)];
1368
1368
  case 1:
1369
1369
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1370
1370
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1424,7 +1424,7 @@ var deserializeAws_restJson1GetSubjectCommandError = function (output, context)
1424
1424
  case 0:
1425
1425
  _a = [__assign({}, output)];
1426
1426
  _c = {};
1427
- return [4, parseBody(output.body, context)];
1427
+ return [4, parseErrorBody(output.body, context)];
1428
1428
  case 1:
1429
1429
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1430
1430
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1484,7 +1484,7 @@ var deserializeAws_restJson1GetTrustAnchorCommandError = function (output, conte
1484
1484
  case 0:
1485
1485
  _a = [__assign({}, output)];
1486
1486
  _c = {};
1487
- return [4, parseBody(output.body, context)];
1487
+ return [4, parseErrorBody(output.body, context)];
1488
1488
  case 1:
1489
1489
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1490
1490
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1548,7 +1548,7 @@ var deserializeAws_restJson1ImportCrlCommandError = function (output, context) {
1548
1548
  case 0:
1549
1549
  _a = [__assign({}, output)];
1550
1550
  _c = {};
1551
- return [4, parseBody(output.body, context)];
1551
+ return [4, parseErrorBody(output.body, context)];
1552
1552
  case 1:
1553
1553
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1554
1554
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1611,7 +1611,7 @@ var deserializeAws_restJson1ListCrlsCommandError = function (output, context) {
1611
1611
  case 0:
1612
1612
  _a = [__assign({}, output)];
1613
1613
  _c = {};
1614
- return [4, parseBody(output.body, context)];
1614
+ return [4, parseErrorBody(output.body, context)];
1615
1615
  case 1:
1616
1616
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1617
1617
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1674,7 +1674,7 @@ var deserializeAws_restJson1ListProfilesCommandError = function (output, context
1674
1674
  case 0:
1675
1675
  _a = [__assign({}, output)];
1676
1676
  _c = {};
1677
- return [4, parseBody(output.body, context)];
1677
+ return [4, parseErrorBody(output.body, context)];
1678
1678
  case 1:
1679
1679
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1680
1680
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1737,7 +1737,7 @@ var deserializeAws_restJson1ListSubjectsCommandError = function (output, context
1737
1737
  case 0:
1738
1738
  _a = [__assign({}, output)];
1739
1739
  _c = {};
1740
- return [4, parseBody(output.body, context)];
1740
+ return [4, parseErrorBody(output.body, context)];
1741
1741
  case 1:
1742
1742
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1743
1743
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1797,7 +1797,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
1797
1797
  case 0:
1798
1798
  _a = [__assign({}, output)];
1799
1799
  _c = {};
1800
- return [4, parseBody(output.body, context)];
1800
+ return [4, parseErrorBody(output.body, context)];
1801
1801
  case 1:
1802
1802
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1803
1803
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1864,7 +1864,7 @@ var deserializeAws_restJson1ListTrustAnchorsCommandError = function (output, con
1864
1864
  case 0:
1865
1865
  _a = [__assign({}, output)];
1866
1866
  _c = {};
1867
- return [4, parseBody(output.body, context)];
1867
+ return [4, parseErrorBody(output.body, context)];
1868
1868
  case 1:
1869
1869
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1870
1870
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1919,7 +1919,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
1919
1919
  case 0:
1920
1920
  _a = [__assign({}, output)];
1921
1921
  _c = {};
1922
- return [4, parseBody(output.body, context)];
1922
+ return [4, parseErrorBody(output.body, context)];
1923
1923
  case 1:
1924
1924
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1925
1925
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1982,7 +1982,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
1982
1982
  case 0:
1983
1983
  _a = [__assign({}, output)];
1984
1984
  _c = {};
1985
- return [4, parseBody(output.body, context)];
1985
+ return [4, parseErrorBody(output.body, context)];
1986
1986
  case 1:
1987
1987
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1988
1988
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2046,7 +2046,7 @@ var deserializeAws_restJson1UpdateCrlCommandError = function (output, context) {
2046
2046
  case 0:
2047
2047
  _a = [__assign({}, output)];
2048
2048
  _c = {};
2049
- return [4, parseBody(output.body, context)];
2049
+ return [4, parseErrorBody(output.body, context)];
2050
2050
  case 1:
2051
2051
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2052
2052
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2110,7 +2110,7 @@ var deserializeAws_restJson1UpdateProfileCommandError = function (output, contex
2110
2110
  case 0:
2111
2111
  _a = [__assign({}, output)];
2112
2112
  _c = {};
2113
- return [4, parseBody(output.body, context)];
2113
+ return [4, parseErrorBody(output.body, context)];
2114
2114
  case 1:
2115
2115
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2116
2116
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2174,7 +2174,7 @@ var deserializeAws_restJson1UpdateTrustAnchorCommandError = function (output, co
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);
@@ -2547,6 +2547,19 @@ var parseBody = function (streamBody, context) {
2547
2547
  return {};
2548
2548
  });
2549
2549
  };
2550
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
2551
+ var value;
2552
+ var _a;
2553
+ return __generator(this, function (_b) {
2554
+ switch (_b.label) {
2555
+ case 0: return [4, parseBody(errorBody, context)];
2556
+ case 1:
2557
+ value = _b.sent();
2558
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2559
+ return [2, value];
2560
+ }
2561
+ });
2562
+ }); };
2550
2563
  var loadRestJsonErrorCode = function (output, data) {
2551
2564
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2552
2565
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-rolesanywhere",
3
3
  "description": "AWS SDK for JavaScript Rolesanywhere 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",