@aws-sdk/client-swf 3.179.0 → 3.181.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
12
+ * **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
13
+
14
+
15
+
16
+
17
+
18
+ # [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
19
+
20
+ **Note:** Version bump only for package @aws-sdk/client-swf
21
+
22
+
23
+
24
+
25
+
6
26
  # [3.179.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.178.0...v3.179.0) (2022-09-26)
7
27
 
8
28
  **Note:** Version bump only for package @aws-sdk/client-swf
@@ -393,7 +393,7 @@ exports.deserializeAws_json1_0CountClosedWorkflowExecutionsCommand = deserialize
393
393
  const deserializeAws_json1_0CountClosedWorkflowExecutionsCommandError = async (output, context) => {
394
394
  const parsedOutput = {
395
395
  ...output,
396
- body: await parseBody(output.body, context),
396
+ body: await parseErrorBody(output.body, context),
397
397
  };
398
398
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
399
399
  switch (errorCode) {
@@ -430,7 +430,7 @@ exports.deserializeAws_json1_0CountOpenWorkflowExecutionsCommand = deserializeAw
430
430
  const deserializeAws_json1_0CountOpenWorkflowExecutionsCommandError = async (output, context) => {
431
431
  const parsedOutput = {
432
432
  ...output,
433
- body: await parseBody(output.body, context),
433
+ body: await parseErrorBody(output.body, context),
434
434
  };
435
435
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
436
436
  switch (errorCode) {
@@ -467,7 +467,7 @@ exports.deserializeAws_json1_0CountPendingActivityTasksCommand = deserializeAws_
467
467
  const deserializeAws_json1_0CountPendingActivityTasksCommandError = async (output, context) => {
468
468
  const parsedOutput = {
469
469
  ...output,
470
- body: await parseBody(output.body, context),
470
+ body: await parseErrorBody(output.body, context),
471
471
  };
472
472
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
473
473
  switch (errorCode) {
@@ -504,7 +504,7 @@ exports.deserializeAws_json1_0CountPendingDecisionTasksCommand = deserializeAws_
504
504
  const deserializeAws_json1_0CountPendingDecisionTasksCommandError = async (output, context) => {
505
505
  const parsedOutput = {
506
506
  ...output,
507
- body: await parseBody(output.body, context),
507
+ body: await parseErrorBody(output.body, context),
508
508
  };
509
509
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
510
510
  switch (errorCode) {
@@ -538,7 +538,7 @@ exports.deserializeAws_json1_0DeprecateActivityTypeCommand = deserializeAws_json
538
538
  const deserializeAws_json1_0DeprecateActivityTypeCommandError = async (output, context) => {
539
539
  const parsedOutput = {
540
540
  ...output,
541
- body: await parseBody(output.body, context),
541
+ body: await parseErrorBody(output.body, context),
542
542
  };
543
543
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
544
544
  switch (errorCode) {
@@ -575,7 +575,7 @@ exports.deserializeAws_json1_0DeprecateDomainCommand = deserializeAws_json1_0Dep
575
575
  const deserializeAws_json1_0DeprecateDomainCommandError = async (output, context) => {
576
576
  const parsedOutput = {
577
577
  ...output,
578
- body: await parseBody(output.body, context),
578
+ body: await parseErrorBody(output.body, context),
579
579
  };
580
580
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
581
581
  switch (errorCode) {
@@ -612,7 +612,7 @@ exports.deserializeAws_json1_0DeprecateWorkflowTypeCommand = deserializeAws_json
612
612
  const deserializeAws_json1_0DeprecateWorkflowTypeCommandError = async (output, context) => {
613
613
  const parsedOutput = {
614
614
  ...output,
615
- body: await parseBody(output.body, context),
615
+ body: await parseErrorBody(output.body, context),
616
616
  };
617
617
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
618
618
  switch (errorCode) {
@@ -652,7 +652,7 @@ exports.deserializeAws_json1_0DescribeActivityTypeCommand = deserializeAws_json1
652
652
  const deserializeAws_json1_0DescribeActivityTypeCommandError = async (output, context) => {
653
653
  const parsedOutput = {
654
654
  ...output,
655
- body: await parseBody(output.body, context),
655
+ body: await parseErrorBody(output.body, context),
656
656
  };
657
657
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
658
658
  switch (errorCode) {
@@ -689,7 +689,7 @@ exports.deserializeAws_json1_0DescribeDomainCommand = deserializeAws_json1_0Desc
689
689
  const deserializeAws_json1_0DescribeDomainCommandError = async (output, context) => {
690
690
  const parsedOutput = {
691
691
  ...output,
692
- body: await parseBody(output.body, context),
692
+ body: await parseErrorBody(output.body, context),
693
693
  };
694
694
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
695
695
  switch (errorCode) {
@@ -726,7 +726,7 @@ exports.deserializeAws_json1_0DescribeWorkflowExecutionCommand = deserializeAws_
726
726
  const deserializeAws_json1_0DescribeWorkflowExecutionCommandError = async (output, context) => {
727
727
  const parsedOutput = {
728
728
  ...output,
729
- body: await parseBody(output.body, context),
729
+ body: await parseErrorBody(output.body, context),
730
730
  };
731
731
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
732
732
  switch (errorCode) {
@@ -763,7 +763,7 @@ exports.deserializeAws_json1_0DescribeWorkflowTypeCommand = deserializeAws_json1
763
763
  const deserializeAws_json1_0DescribeWorkflowTypeCommandError = async (output, context) => {
764
764
  const parsedOutput = {
765
765
  ...output,
766
- body: await parseBody(output.body, context),
766
+ body: await parseErrorBody(output.body, context),
767
767
  };
768
768
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
769
769
  switch (errorCode) {
@@ -800,7 +800,7 @@ exports.deserializeAws_json1_0GetWorkflowExecutionHistoryCommand = deserializeAw
800
800
  const deserializeAws_json1_0GetWorkflowExecutionHistoryCommandError = 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) {
@@ -837,7 +837,7 @@ exports.deserializeAws_json1_0ListActivityTypesCommand = deserializeAws_json1_0L
837
837
  const deserializeAws_json1_0ListActivityTypesCommandError = async (output, context) => {
838
838
  const parsedOutput = {
839
839
  ...output,
840
- body: await parseBody(output.body, context),
840
+ body: await parseErrorBody(output.body, context),
841
841
  };
842
842
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
843
843
  switch (errorCode) {
@@ -874,7 +874,7 @@ exports.deserializeAws_json1_0ListClosedWorkflowExecutionsCommand = deserializeA
874
874
  const deserializeAws_json1_0ListClosedWorkflowExecutionsCommandError = async (output, context) => {
875
875
  const parsedOutput = {
876
876
  ...output,
877
- body: await parseBody(output.body, context),
877
+ body: await parseErrorBody(output.body, context),
878
878
  };
879
879
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
880
880
  switch (errorCode) {
@@ -911,7 +911,7 @@ exports.deserializeAws_json1_0ListDomainsCommand = deserializeAws_json1_0ListDom
911
911
  const deserializeAws_json1_0ListDomainsCommandError = async (output, context) => {
912
912
  const parsedOutput = {
913
913
  ...output,
914
- body: await parseBody(output.body, context),
914
+ body: await parseErrorBody(output.body, context),
915
915
  };
916
916
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
917
917
  switch (errorCode) {
@@ -945,7 +945,7 @@ exports.deserializeAws_json1_0ListOpenWorkflowExecutionsCommand = deserializeAws
945
945
  const deserializeAws_json1_0ListOpenWorkflowExecutionsCommandError = async (output, context) => {
946
946
  const parsedOutput = {
947
947
  ...output,
948
- body: await parseBody(output.body, context),
948
+ body: await parseErrorBody(output.body, context),
949
949
  };
950
950
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
951
951
  switch (errorCode) {
@@ -982,7 +982,7 @@ exports.deserializeAws_json1_0ListTagsForResourceCommand = deserializeAws_json1_
982
982
  const deserializeAws_json1_0ListTagsForResourceCommandError = async (output, context) => {
983
983
  const parsedOutput = {
984
984
  ...output,
985
- body: await parseBody(output.body, context),
985
+ body: await parseErrorBody(output.body, context),
986
986
  };
987
987
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
988
988
  switch (errorCode) {
@@ -1022,7 +1022,7 @@ exports.deserializeAws_json1_0ListWorkflowTypesCommand = deserializeAws_json1_0L
1022
1022
  const deserializeAws_json1_0ListWorkflowTypesCommandError = async (output, context) => {
1023
1023
  const parsedOutput = {
1024
1024
  ...output,
1025
- body: await parseBody(output.body, context),
1025
+ body: await parseErrorBody(output.body, context),
1026
1026
  };
1027
1027
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1028
1028
  switch (errorCode) {
@@ -1059,7 +1059,7 @@ exports.deserializeAws_json1_0PollForActivityTaskCommand = deserializeAws_json1_
1059
1059
  const deserializeAws_json1_0PollForActivityTaskCommandError = async (output, context) => {
1060
1060
  const parsedOutput = {
1061
1061
  ...output,
1062
- body: await parseBody(output.body, context),
1062
+ body: await parseErrorBody(output.body, context),
1063
1063
  };
1064
1064
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1065
1065
  switch (errorCode) {
@@ -1099,7 +1099,7 @@ exports.deserializeAws_json1_0PollForDecisionTaskCommand = deserializeAws_json1_
1099
1099
  const deserializeAws_json1_0PollForDecisionTaskCommandError = async (output, context) => {
1100
1100
  const parsedOutput = {
1101
1101
  ...output,
1102
- body: await parseBody(output.body, context),
1102
+ body: await parseErrorBody(output.body, context),
1103
1103
  };
1104
1104
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1105
1105
  switch (errorCode) {
@@ -1139,7 +1139,7 @@ exports.deserializeAws_json1_0RecordActivityTaskHeartbeatCommand = deserializeAw
1139
1139
  const deserializeAws_json1_0RecordActivityTaskHeartbeatCommandError = async (output, context) => {
1140
1140
  const parsedOutput = {
1141
1141
  ...output,
1142
- body: await parseBody(output.body, context),
1142
+ body: await parseErrorBody(output.body, context),
1143
1143
  };
1144
1144
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1145
1145
  switch (errorCode) {
@@ -1173,7 +1173,7 @@ exports.deserializeAws_json1_0RegisterActivityTypeCommand = deserializeAws_json1
1173
1173
  const deserializeAws_json1_0RegisterActivityTypeCommandError = async (output, context) => {
1174
1174
  const parsedOutput = {
1175
1175
  ...output,
1176
- body: await parseBody(output.body, context),
1176
+ body: await parseErrorBody(output.body, context),
1177
1177
  };
1178
1178
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1179
1179
  switch (errorCode) {
@@ -1213,7 +1213,7 @@ exports.deserializeAws_json1_0RegisterDomainCommand = deserializeAws_json1_0Regi
1213
1213
  const deserializeAws_json1_0RegisterDomainCommandError = async (output, context) => {
1214
1214
  const parsedOutput = {
1215
1215
  ...output,
1216
- body: await parseBody(output.body, context),
1216
+ body: await parseErrorBody(output.body, context),
1217
1217
  };
1218
1218
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1219
1219
  switch (errorCode) {
@@ -1253,7 +1253,7 @@ exports.deserializeAws_json1_0RegisterWorkflowTypeCommand = deserializeAws_json1
1253
1253
  const deserializeAws_json1_0RegisterWorkflowTypeCommandError = async (output, context) => {
1254
1254
  const parsedOutput = {
1255
1255
  ...output,
1256
- body: await parseBody(output.body, context),
1256
+ body: await parseErrorBody(output.body, context),
1257
1257
  };
1258
1258
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1259
1259
  switch (errorCode) {
@@ -1293,7 +1293,7 @@ exports.deserializeAws_json1_0RequestCancelWorkflowExecutionCommand = deserializ
1293
1293
  const deserializeAws_json1_0RequestCancelWorkflowExecutionCommandError = async (output, context) => {
1294
1294
  const parsedOutput = {
1295
1295
  ...output,
1296
- body: await parseBody(output.body, context),
1296
+ body: await parseErrorBody(output.body, context),
1297
1297
  };
1298
1298
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1299
1299
  switch (errorCode) {
@@ -1327,7 +1327,7 @@ exports.deserializeAws_json1_0RespondActivityTaskCanceledCommand = deserializeAw
1327
1327
  const deserializeAws_json1_0RespondActivityTaskCanceledCommandError = async (output, context) => {
1328
1328
  const parsedOutput = {
1329
1329
  ...output,
1330
- body: await parseBody(output.body, context),
1330
+ body: await parseErrorBody(output.body, context),
1331
1331
  };
1332
1332
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1333
1333
  switch (errorCode) {
@@ -1361,7 +1361,7 @@ exports.deserializeAws_json1_0RespondActivityTaskCompletedCommand = deserializeA
1361
1361
  const deserializeAws_json1_0RespondActivityTaskCompletedCommandError = 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) {
@@ -1395,7 +1395,7 @@ exports.deserializeAws_json1_0RespondActivityTaskFailedCommand = deserializeAws_
1395
1395
  const deserializeAws_json1_0RespondActivityTaskFailedCommandError = async (output, context) => {
1396
1396
  const parsedOutput = {
1397
1397
  ...output,
1398
- body: await parseBody(output.body, context),
1398
+ body: await parseErrorBody(output.body, context),
1399
1399
  };
1400
1400
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1401
1401
  switch (errorCode) {
@@ -1429,7 +1429,7 @@ exports.deserializeAws_json1_0RespondDecisionTaskCompletedCommand = deserializeA
1429
1429
  const deserializeAws_json1_0RespondDecisionTaskCompletedCommandError = async (output, context) => {
1430
1430
  const parsedOutput = {
1431
1431
  ...output,
1432
- body: await parseBody(output.body, context),
1432
+ body: await parseErrorBody(output.body, context),
1433
1433
  };
1434
1434
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1435
1435
  switch (errorCode) {
@@ -1463,7 +1463,7 @@ exports.deserializeAws_json1_0SignalWorkflowExecutionCommand = deserializeAws_js
1463
1463
  const deserializeAws_json1_0SignalWorkflowExecutionCommandError = 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_json1_0StartWorkflowExecutionCommand = deserializeAws_jso
1500
1500
  const deserializeAws_json1_0StartWorkflowExecutionCommandError = 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) {
@@ -1546,7 +1546,7 @@ exports.deserializeAws_json1_0TagResourceCommand = deserializeAws_json1_0TagReso
1546
1546
  const deserializeAws_json1_0TagResourceCommandError = async (output, context) => {
1547
1547
  const parsedOutput = {
1548
1548
  ...output,
1549
- body: await parseBody(output.body, context),
1549
+ body: await parseErrorBody(output.body, context),
1550
1550
  };
1551
1551
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1552
1552
  switch (errorCode) {
@@ -1586,7 +1586,7 @@ exports.deserializeAws_json1_0TerminateWorkflowExecutionCommand = deserializeAws
1586
1586
  const deserializeAws_json1_0TerminateWorkflowExecutionCommandError = async (output, context) => {
1587
1587
  const parsedOutput = {
1588
1588
  ...output,
1589
- body: await parseBody(output.body, context),
1589
+ body: await parseErrorBody(output.body, context),
1590
1590
  };
1591
1591
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1592
1592
  switch (errorCode) {
@@ -1620,7 +1620,7 @@ exports.deserializeAws_json1_0UndeprecateActivityTypeCommand = deserializeAws_js
1620
1620
  const deserializeAws_json1_0UndeprecateActivityTypeCommandError = async (output, context) => {
1621
1621
  const parsedOutput = {
1622
1622
  ...output,
1623
- body: await parseBody(output.body, context),
1623
+ body: await parseErrorBody(output.body, context),
1624
1624
  };
1625
1625
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1626
1626
  switch (errorCode) {
@@ -1657,7 +1657,7 @@ exports.deserializeAws_json1_0UndeprecateDomainCommand = deserializeAws_json1_0U
1657
1657
  const deserializeAws_json1_0UndeprecateDomainCommandError = async (output, context) => {
1658
1658
  const parsedOutput = {
1659
1659
  ...output,
1660
- body: await parseBody(output.body, context),
1660
+ body: await parseErrorBody(output.body, context),
1661
1661
  };
1662
1662
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1663
1663
  switch (errorCode) {
@@ -1694,7 +1694,7 @@ exports.deserializeAws_json1_0UndeprecateWorkflowTypeCommand = deserializeAws_js
1694
1694
  const deserializeAws_json1_0UndeprecateWorkflowTypeCommandError = async (output, context) => {
1695
1695
  const parsedOutput = {
1696
1696
  ...output,
1697
- body: await parseBody(output.body, context),
1697
+ body: await parseErrorBody(output.body, context),
1698
1698
  };
1699
1699
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1700
1700
  switch (errorCode) {
@@ -1731,7 +1731,7 @@ exports.deserializeAws_json1_0UntagResourceCommand = deserializeAws_json1_0Untag
1731
1731
  const deserializeAws_json1_0UntagResourceCommandError = async (output, context) => {
1732
1732
  const parsedOutput = {
1733
1733
  ...output,
1734
- body: await parseBody(output.body, context),
1734
+ body: await parseErrorBody(output.body, context),
1735
1735
  };
1736
1736
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1737
1737
  switch (errorCode) {
@@ -3462,6 +3462,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
3462
3462
  }
3463
3463
  return {};
3464
3464
  });
3465
+ const parseErrorBody = async (errorBody, context) => {
3466
+ var _a;
3467
+ const value = await parseBody(errorBody, context);
3468
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
3469
+ return value;
3470
+ };
3465
3471
  const loadRestJsonErrorCode = (output, data) => {
3466
3472
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3467
3473
  const sanitizeErrorCode = (rawValue) => {
@@ -436,7 +436,7 @@ var deserializeAws_json1_0CountClosedWorkflowExecutionsCommandError = function (
436
436
  case 0:
437
437
  _a = [__assign({}, output)];
438
438
  _c = {};
439
- return [4, parseBody(output.body, context)];
439
+ return [4, parseErrorBody(output.body, context)];
440
440
  case 1:
441
441
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
442
442
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -491,7 +491,7 @@ var deserializeAws_json1_0CountOpenWorkflowExecutionsCommandError = function (ou
491
491
  case 0:
492
492
  _a = [__assign({}, output)];
493
493
  _c = {};
494
- return [4, parseBody(output.body, context)];
494
+ return [4, parseErrorBody(output.body, context)];
495
495
  case 1:
496
496
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
497
497
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -546,7 +546,7 @@ var deserializeAws_json1_0CountPendingActivityTasksCommandError = function (outp
546
546
  case 0:
547
547
  _a = [__assign({}, output)];
548
548
  _c = {};
549
- return [4, parseBody(output.body, context)];
549
+ return [4, parseErrorBody(output.body, context)];
550
550
  case 1:
551
551
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
552
552
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -601,7 +601,7 @@ var deserializeAws_json1_0CountPendingDecisionTasksCommandError = function (outp
601
601
  case 0:
602
602
  _a = [__assign({}, output)];
603
603
  _c = {};
604
- return [4, parseBody(output.body, context)];
604
+ return [4, parseErrorBody(output.body, context)];
605
605
  case 1:
606
606
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
607
607
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -656,7 +656,7 @@ var deserializeAws_json1_0DeprecateActivityTypeCommandError = function (output,
656
656
  case 0:
657
657
  _a = [__assign({}, output)];
658
658
  _c = {};
659
- return [4, parseBody(output.body, context)];
659
+ return [4, parseErrorBody(output.body, context)];
660
660
  case 1:
661
661
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
662
662
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -715,7 +715,7 @@ var deserializeAws_json1_0DeprecateDomainCommandError = function (output, contex
715
715
  case 0:
716
716
  _a = [__assign({}, output)];
717
717
  _c = {};
718
- return [4, parseBody(output.body, context)];
718
+ return [4, parseErrorBody(output.body, context)];
719
719
  case 1:
720
720
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
721
721
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -774,7 +774,7 @@ var deserializeAws_json1_0DeprecateWorkflowTypeCommandError = function (output,
774
774
  case 0:
775
775
  _a = [__assign({}, output)];
776
776
  _c = {};
777
- return [4, parseBody(output.body, context)];
777
+ return [4, parseErrorBody(output.body, context)];
778
778
  case 1:
779
779
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
780
780
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -833,7 +833,7 @@ var deserializeAws_json1_0DescribeActivityTypeCommandError = function (output, c
833
833
  case 0:
834
834
  _a = [__assign({}, output)];
835
835
  _c = {};
836
- return [4, parseBody(output.body, context)];
836
+ return [4, parseErrorBody(output.body, context)];
837
837
  case 1:
838
838
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
839
839
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -888,7 +888,7 @@ var deserializeAws_json1_0DescribeDomainCommandError = function (output, context
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);
@@ -943,7 +943,7 @@ var deserializeAws_json1_0DescribeWorkflowExecutionCommandError = function (outp
943
943
  case 0:
944
944
  _a = [__assign({}, output)];
945
945
  _c = {};
946
- return [4, parseBody(output.body, context)];
946
+ return [4, parseErrorBody(output.body, context)];
947
947
  case 1:
948
948
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
949
949
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -998,7 +998,7 @@ var deserializeAws_json1_0DescribeWorkflowTypeCommandError = function (output, c
998
998
  case 0:
999
999
  _a = [__assign({}, output)];
1000
1000
  _c = {};
1001
- return [4, parseBody(output.body, context)];
1001
+ return [4, parseErrorBody(output.body, context)];
1002
1002
  case 1:
1003
1003
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1004
1004
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1053,7 +1053,7 @@ var deserializeAws_json1_0GetWorkflowExecutionHistoryCommandError = function (ou
1053
1053
  case 0:
1054
1054
  _a = [__assign({}, output)];
1055
1055
  _c = {};
1056
- return [4, parseBody(output.body, context)];
1056
+ return [4, parseErrorBody(output.body, context)];
1057
1057
  case 1:
1058
1058
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1059
1059
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1108,7 +1108,7 @@ var deserializeAws_json1_0ListActivityTypesCommandError = function (output, cont
1108
1108
  case 0:
1109
1109
  _a = [__assign({}, output)];
1110
1110
  _c = {};
1111
- return [4, parseBody(output.body, context)];
1111
+ return [4, parseErrorBody(output.body, context)];
1112
1112
  case 1:
1113
1113
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1114
1114
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1163,7 +1163,7 @@ var deserializeAws_json1_0ListClosedWorkflowExecutionsCommandError = function (o
1163
1163
  case 0:
1164
1164
  _a = [__assign({}, output)];
1165
1165
  _c = {};
1166
- return [4, parseBody(output.body, context)];
1166
+ return [4, parseErrorBody(output.body, context)];
1167
1167
  case 1:
1168
1168
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1169
1169
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1218,7 +1218,7 @@ var deserializeAws_json1_0ListDomainsCommandError = function (output, context) {
1218
1218
  case 0:
1219
1219
  _a = [__assign({}, output)];
1220
1220
  _c = {};
1221
- return [4, parseBody(output.body, context)];
1221
+ return [4, parseErrorBody(output.body, context)];
1222
1222
  case 1:
1223
1223
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1224
1224
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1269,7 +1269,7 @@ var deserializeAws_json1_0ListOpenWorkflowExecutionsCommandError = function (out
1269
1269
  case 0:
1270
1270
  _a = [__assign({}, output)];
1271
1271
  _c = {};
1272
- return [4, parseBody(output.body, context)];
1272
+ return [4, parseErrorBody(output.body, context)];
1273
1273
  case 1:
1274
1274
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1275
1275
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1324,7 +1324,7 @@ var deserializeAws_json1_0ListTagsForResourceCommandError = function (output, co
1324
1324
  case 0:
1325
1325
  _a = [__assign({}, output)];
1326
1326
  _c = {};
1327
- return [4, parseBody(output.body, context)];
1327
+ return [4, parseErrorBody(output.body, context)];
1328
1328
  case 1:
1329
1329
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1330
1330
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1383,7 +1383,7 @@ var deserializeAws_json1_0ListWorkflowTypesCommandError = function (output, cont
1383
1383
  case 0:
1384
1384
  _a = [__assign({}, output)];
1385
1385
  _c = {};
1386
- return [4, parseBody(output.body, context)];
1386
+ return [4, parseErrorBody(output.body, context)];
1387
1387
  case 1:
1388
1388
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1389
1389
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1438,7 +1438,7 @@ var deserializeAws_json1_0PollForActivityTaskCommandError = function (output, co
1438
1438
  case 0:
1439
1439
  _a = [__assign({}, output)];
1440
1440
  _c = {};
1441
- return [4, parseBody(output.body, context)];
1441
+ return [4, parseErrorBody(output.body, context)];
1442
1442
  case 1:
1443
1443
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1444
1444
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1497,7 +1497,7 @@ var deserializeAws_json1_0PollForDecisionTaskCommandError = function (output, co
1497
1497
  case 0:
1498
1498
  _a = [__assign({}, output)];
1499
1499
  _c = {};
1500
- return [4, parseBody(output.body, context)];
1500
+ return [4, parseErrorBody(output.body, context)];
1501
1501
  case 1:
1502
1502
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1503
1503
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1556,7 +1556,7 @@ var deserializeAws_json1_0RecordActivityTaskHeartbeatCommandError = function (ou
1556
1556
  case 0:
1557
1557
  _a = [__assign({}, output)];
1558
1558
  _c = {};
1559
- return [4, parseBody(output.body, context)];
1559
+ return [4, parseErrorBody(output.body, context)];
1560
1560
  case 1:
1561
1561
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1562
1562
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1611,7 +1611,7 @@ var deserializeAws_json1_0RegisterActivityTypeCommandError = function (output, c
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_json1_0RegisterDomainCommandError = 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_json1_0RegisterWorkflowTypeCommandError = function (output, c
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);
@@ -1800,7 +1800,7 @@ var deserializeAws_json1_0RequestCancelWorkflowExecutionCommandError = function
1800
1800
  case 0:
1801
1801
  _a = [__assign({}, output)];
1802
1802
  _c = {};
1803
- return [4, parseBody(output.body, context)];
1803
+ return [4, parseErrorBody(output.body, context)];
1804
1804
  case 1:
1805
1805
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1806
1806
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1855,7 +1855,7 @@ var deserializeAws_json1_0RespondActivityTaskCanceledCommandError = 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);
@@ -1910,7 +1910,7 @@ var deserializeAws_json1_0RespondActivityTaskCompletedCommandError = function (o
1910
1910
  case 0:
1911
1911
  _a = [__assign({}, output)];
1912
1912
  _c = {};
1913
- return [4, parseBody(output.body, context)];
1913
+ return [4, parseErrorBody(output.body, context)];
1914
1914
  case 1:
1915
1915
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1916
1916
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1965,7 +1965,7 @@ var deserializeAws_json1_0RespondActivityTaskFailedCommandError = function (outp
1965
1965
  case 0:
1966
1966
  _a = [__assign({}, output)];
1967
1967
  _c = {};
1968
- return [4, parseBody(output.body, context)];
1968
+ return [4, parseErrorBody(output.body, context)];
1969
1969
  case 1:
1970
1970
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1971
1971
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2020,7 +2020,7 @@ var deserializeAws_json1_0RespondDecisionTaskCompletedCommandError = function (o
2020
2020
  case 0:
2021
2021
  _a = [__assign({}, output)];
2022
2022
  _c = {};
2023
- return [4, parseBody(output.body, context)];
2023
+ return [4, parseErrorBody(output.body, context)];
2024
2024
  case 1:
2025
2025
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2026
2026
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2075,7 +2075,7 @@ var deserializeAws_json1_0SignalWorkflowExecutionCommandError = function (output
2075
2075
  case 0:
2076
2076
  _a = [__assign({}, output)];
2077
2077
  _c = {};
2078
- return [4, parseBody(output.body, context)];
2078
+ return [4, parseErrorBody(output.body, context)];
2079
2079
  case 1:
2080
2080
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2081
2081
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2130,7 +2130,7 @@ var deserializeAws_json1_0StartWorkflowExecutionCommandError = function (output,
2130
2130
  case 0:
2131
2131
  _a = [__assign({}, output)];
2132
2132
  _c = {};
2133
- return [4, parseBody(output.body, context)];
2133
+ return [4, parseErrorBody(output.body, context)];
2134
2134
  case 1:
2135
2135
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2136
2136
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2201,7 +2201,7 @@ var deserializeAws_json1_0TagResourceCommandError = function (output, context) {
2201
2201
  case 0:
2202
2202
  _a = [__assign({}, output)];
2203
2203
  _c = {};
2204
- return [4, parseBody(output.body, context)];
2204
+ return [4, parseErrorBody(output.body, context)];
2205
2205
  case 1:
2206
2206
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2207
2207
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2264,7 +2264,7 @@ var deserializeAws_json1_0TerminateWorkflowExecutionCommandError = function (out
2264
2264
  case 0:
2265
2265
  _a = [__assign({}, output)];
2266
2266
  _c = {};
2267
- return [4, parseBody(output.body, context)];
2267
+ return [4, parseErrorBody(output.body, context)];
2268
2268
  case 1:
2269
2269
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2270
2270
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2319,7 +2319,7 @@ var deserializeAws_json1_0UndeprecateActivityTypeCommandError = function (output
2319
2319
  case 0:
2320
2320
  _a = [__assign({}, output)];
2321
2321
  _c = {};
2322
- return [4, parseBody(output.body, context)];
2322
+ return [4, parseErrorBody(output.body, context)];
2323
2323
  case 1:
2324
2324
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2325
2325
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2378,7 +2378,7 @@ var deserializeAws_json1_0UndeprecateDomainCommandError = function (output, cont
2378
2378
  case 0:
2379
2379
  _a = [__assign({}, output)];
2380
2380
  _c = {};
2381
- return [4, parseBody(output.body, context)];
2381
+ return [4, parseErrorBody(output.body, context)];
2382
2382
  case 1:
2383
2383
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2384
2384
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2437,7 +2437,7 @@ var deserializeAws_json1_0UndeprecateWorkflowTypeCommandError = function (output
2437
2437
  case 0:
2438
2438
  _a = [__assign({}, output)];
2439
2439
  _c = {};
2440
- return [4, parseBody(output.body, context)];
2440
+ return [4, parseErrorBody(output.body, context)];
2441
2441
  case 1:
2442
2442
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2443
2443
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2496,7 +2496,7 @@ var deserializeAws_json1_0UntagResourceCommandError = function (output, context)
2496
2496
  case 0:
2497
2497
  _a = [__assign({}, output)];
2498
2498
  _c = {};
2499
- return [4, parseBody(output.body, context)];
2499
+ return [4, parseErrorBody(output.body, context)];
2500
2500
  case 1:
2501
2501
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2502
2502
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3957,6 +3957,19 @@ var parseBody = function (streamBody, context) {
3957
3957
  return {};
3958
3958
  });
3959
3959
  };
3960
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
3961
+ var value;
3962
+ var _a;
3963
+ return __generator(this, function (_b) {
3964
+ switch (_b.label) {
3965
+ case 0: return [4, parseBody(errorBody, context)];
3966
+ case 1:
3967
+ value = _b.sent();
3968
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
3969
+ return [2, value];
3970
+ }
3971
+ });
3972
+ }); };
3960
3973
  var loadRestJsonErrorCode = function (output, data) {
3961
3974
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
3962
3975
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-swf",
3
3
  "description": "AWS SDK for JavaScript Swf Client for Node.js, Browser and React Native",
4
- "version": "3.179.0",
4
+ "version": "3.181.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -19,9 +19,9 @@
19
19
  "dependencies": {
20
20
  "@aws-crypto/sha256-browser": "2.0.0",
21
21
  "@aws-crypto/sha256-js": "2.0.0",
22
- "@aws-sdk/client-sts": "3.179.0",
22
+ "@aws-sdk/client-sts": "3.181.0",
23
23
  "@aws-sdk/config-resolver": "3.178.0",
24
- "@aws-sdk/credential-provider-node": "3.178.0",
24
+ "@aws-sdk/credential-provider-node": "3.181.0",
25
25
  "@aws-sdk/fetch-http-handler": "3.178.0",
26
26
  "@aws-sdk/hash-node": "3.178.0",
27
27
  "@aws-sdk/invalid-dependency": "3.178.0",
@@ -37,15 +37,15 @@
37
37
  "@aws-sdk/node-config-provider": "3.178.0",
38
38
  "@aws-sdk/node-http-handler": "3.178.0",
39
39
  "@aws-sdk/protocol-http": "3.178.0",
40
- "@aws-sdk/smithy-client": "3.178.0",
40
+ "@aws-sdk/smithy-client": "3.180.0",
41
41
  "@aws-sdk/types": "3.178.0",
42
42
  "@aws-sdk/url-parser": "3.178.0",
43
43
  "@aws-sdk/util-base64-browser": "3.170.0",
44
44
  "@aws-sdk/util-base64-node": "3.170.0",
45
45
  "@aws-sdk/util-body-length-browser": "3.170.0",
46
46
  "@aws-sdk/util-body-length-node": "3.170.0",
47
- "@aws-sdk/util-defaults-mode-browser": "3.178.0",
48
- "@aws-sdk/util-defaults-mode-node": "3.178.0",
47
+ "@aws-sdk/util-defaults-mode-browser": "3.180.0",
48
+ "@aws-sdk/util-defaults-mode-node": "3.180.0",
49
49
  "@aws-sdk/util-user-agent-browser": "3.178.0",
50
50
  "@aws-sdk/util-user-agent-node": "3.178.0",
51
51
  "@aws-sdk/util-utf8-browser": "3.170.0",