@aws-sdk/client-xray 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 +12 -0
- package/dist-cjs/protocols/Aws_restJson1.js +33 -27
- package/dist-es/protocols/Aws_restJson1.js +40 -27
- package/package.json +3 -3
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-xray
|
|
@@ -657,7 +657,7 @@ exports.deserializeAws_restJson1BatchGetTracesCommand = deserializeAws_restJson1
|
|
|
657
657
|
const deserializeAws_restJson1BatchGetTracesCommandError = async (output, context) => {
|
|
658
658
|
const parsedOutput = {
|
|
659
659
|
...output,
|
|
660
|
-
body: await
|
|
660
|
+
body: await parseErrorBody(output.body, context),
|
|
661
661
|
};
|
|
662
662
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
663
663
|
switch (errorCode) {
|
|
@@ -694,7 +694,7 @@ exports.deserializeAws_restJson1CreateGroupCommand = deserializeAws_restJson1Cre
|
|
|
694
694
|
const deserializeAws_restJson1CreateGroupCommandError = async (output, context) => {
|
|
695
695
|
const parsedOutput = {
|
|
696
696
|
...output,
|
|
697
|
-
body: await
|
|
697
|
+
body: await parseErrorBody(output.body, context),
|
|
698
698
|
};
|
|
699
699
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
700
700
|
switch (errorCode) {
|
|
@@ -731,7 +731,7 @@ exports.deserializeAws_restJson1CreateSamplingRuleCommand = deserializeAws_restJ
|
|
|
731
731
|
const deserializeAws_restJson1CreateSamplingRuleCommandError = async (output, context) => {
|
|
732
732
|
const parsedOutput = {
|
|
733
733
|
...output,
|
|
734
|
-
body: await
|
|
734
|
+
body: await parseErrorBody(output.body, context),
|
|
735
735
|
};
|
|
736
736
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
737
737
|
switch (errorCode) {
|
|
@@ -768,7 +768,7 @@ exports.deserializeAws_restJson1DeleteGroupCommand = deserializeAws_restJson1Del
|
|
|
768
768
|
const deserializeAws_restJson1DeleteGroupCommandError = async (output, context) => {
|
|
769
769
|
const parsedOutput = {
|
|
770
770
|
...output,
|
|
771
|
-
body: await
|
|
771
|
+
body: await parseErrorBody(output.body, context),
|
|
772
772
|
};
|
|
773
773
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
774
774
|
switch (errorCode) {
|
|
@@ -805,7 +805,7 @@ exports.deserializeAws_restJson1DeleteSamplingRuleCommand = deserializeAws_restJ
|
|
|
805
805
|
const deserializeAws_restJson1DeleteSamplingRuleCommandError = async (output, context) => {
|
|
806
806
|
const parsedOutput = {
|
|
807
807
|
...output,
|
|
808
|
-
body: await
|
|
808
|
+
body: await parseErrorBody(output.body, context),
|
|
809
809
|
};
|
|
810
810
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
811
811
|
switch (errorCode) {
|
|
@@ -842,7 +842,7 @@ exports.deserializeAws_restJson1GetEncryptionConfigCommand = deserializeAws_rest
|
|
|
842
842
|
const deserializeAws_restJson1GetEncryptionConfigCommandError = async (output, context) => {
|
|
843
843
|
const parsedOutput = {
|
|
844
844
|
...output,
|
|
845
|
-
body: await
|
|
845
|
+
body: await parseErrorBody(output.body, context),
|
|
846
846
|
};
|
|
847
847
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
848
848
|
switch (errorCode) {
|
|
@@ -879,7 +879,7 @@ exports.deserializeAws_restJson1GetGroupCommand = deserializeAws_restJson1GetGro
|
|
|
879
879
|
const deserializeAws_restJson1GetGroupCommandError = async (output, context) => {
|
|
880
880
|
const parsedOutput = {
|
|
881
881
|
...output,
|
|
882
|
-
body: await
|
|
882
|
+
body: await parseErrorBody(output.body, context),
|
|
883
883
|
};
|
|
884
884
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
885
885
|
switch (errorCode) {
|
|
@@ -919,7 +919,7 @@ exports.deserializeAws_restJson1GetGroupsCommand = deserializeAws_restJson1GetGr
|
|
|
919
919
|
const deserializeAws_restJson1GetGroupsCommandError = async (output, context) => {
|
|
920
920
|
const parsedOutput = {
|
|
921
921
|
...output,
|
|
922
|
-
body: await
|
|
922
|
+
body: await parseErrorBody(output.body, context),
|
|
923
923
|
};
|
|
924
924
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
925
925
|
switch (errorCode) {
|
|
@@ -956,7 +956,7 @@ exports.deserializeAws_restJson1GetInsightCommand = deserializeAws_restJson1GetI
|
|
|
956
956
|
const deserializeAws_restJson1GetInsightCommandError = async (output, context) => {
|
|
957
957
|
const parsedOutput = {
|
|
958
958
|
...output,
|
|
959
|
-
body: await
|
|
959
|
+
body: await parseErrorBody(output.body, context),
|
|
960
960
|
};
|
|
961
961
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
962
962
|
switch (errorCode) {
|
|
@@ -996,7 +996,7 @@ exports.deserializeAws_restJson1GetInsightEventsCommand = deserializeAws_restJso
|
|
|
996
996
|
const deserializeAws_restJson1GetInsightEventsCommandError = async (output, context) => {
|
|
997
997
|
const parsedOutput = {
|
|
998
998
|
...output,
|
|
999
|
-
body: await
|
|
999
|
+
body: await parseErrorBody(output.body, context),
|
|
1000
1000
|
};
|
|
1001
1001
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1002
1002
|
switch (errorCode) {
|
|
@@ -1051,7 +1051,7 @@ exports.deserializeAws_restJson1GetInsightImpactGraphCommand = deserializeAws_re
|
|
|
1051
1051
|
const deserializeAws_restJson1GetInsightImpactGraphCommandError = async (output, context) => {
|
|
1052
1052
|
const parsedOutput = {
|
|
1053
1053
|
...output,
|
|
1054
|
-
body: await
|
|
1054
|
+
body: await parseErrorBody(output.body, context),
|
|
1055
1055
|
};
|
|
1056
1056
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1057
1057
|
switch (errorCode) {
|
|
@@ -1091,7 +1091,7 @@ exports.deserializeAws_restJson1GetInsightSummariesCommand = deserializeAws_rest
|
|
|
1091
1091
|
const deserializeAws_restJson1GetInsightSummariesCommandError = async (output, context) => {
|
|
1092
1092
|
const parsedOutput = {
|
|
1093
1093
|
...output,
|
|
1094
|
-
body: await
|
|
1094
|
+
body: await parseErrorBody(output.body, context),
|
|
1095
1095
|
};
|
|
1096
1096
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1097
1097
|
switch (errorCode) {
|
|
@@ -1131,7 +1131,7 @@ exports.deserializeAws_restJson1GetSamplingRulesCommand = deserializeAws_restJso
|
|
|
1131
1131
|
const deserializeAws_restJson1GetSamplingRulesCommandError = async (output, context) => {
|
|
1132
1132
|
const parsedOutput = {
|
|
1133
1133
|
...output,
|
|
1134
|
-
body: await
|
|
1134
|
+
body: await parseErrorBody(output.body, context),
|
|
1135
1135
|
};
|
|
1136
1136
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1137
1137
|
switch (errorCode) {
|
|
@@ -1171,7 +1171,7 @@ exports.deserializeAws_restJson1GetSamplingStatisticSummariesCommand = deseriali
|
|
|
1171
1171
|
const deserializeAws_restJson1GetSamplingStatisticSummariesCommandError = async (output, context) => {
|
|
1172
1172
|
const parsedOutput = {
|
|
1173
1173
|
...output,
|
|
1174
|
-
body: await
|
|
1174
|
+
body: await parseErrorBody(output.body, context),
|
|
1175
1175
|
};
|
|
1176
1176
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1177
1177
|
switch (errorCode) {
|
|
@@ -1214,7 +1214,7 @@ exports.deserializeAws_restJson1GetSamplingTargetsCommand = deserializeAws_restJ
|
|
|
1214
1214
|
const deserializeAws_restJson1GetSamplingTargetsCommandError = async (output, context) => {
|
|
1215
1215
|
const parsedOutput = {
|
|
1216
1216
|
...output,
|
|
1217
|
-
body: await
|
|
1217
|
+
body: await parseErrorBody(output.body, context),
|
|
1218
1218
|
};
|
|
1219
1219
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1220
1220
|
switch (errorCode) {
|
|
@@ -1263,7 +1263,7 @@ exports.deserializeAws_restJson1GetServiceGraphCommand = deserializeAws_restJson
|
|
|
1263
1263
|
const deserializeAws_restJson1GetServiceGraphCommandError = async (output, context) => {
|
|
1264
1264
|
const parsedOutput = {
|
|
1265
1265
|
...output,
|
|
1266
|
-
body: await
|
|
1266
|
+
body: await parseErrorBody(output.body, context),
|
|
1267
1267
|
};
|
|
1268
1268
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1269
1269
|
switch (errorCode) {
|
|
@@ -1306,7 +1306,7 @@ exports.deserializeAws_restJson1GetTimeSeriesServiceStatisticsCommand = deserial
|
|
|
1306
1306
|
const deserializeAws_restJson1GetTimeSeriesServiceStatisticsCommandError = async (output, context) => {
|
|
1307
1307
|
const parsedOutput = {
|
|
1308
1308
|
...output,
|
|
1309
|
-
body: await
|
|
1309
|
+
body: await parseErrorBody(output.body, context),
|
|
1310
1310
|
};
|
|
1311
1311
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1312
1312
|
switch (errorCode) {
|
|
@@ -1346,7 +1346,7 @@ exports.deserializeAws_restJson1GetTraceGraphCommand = deserializeAws_restJson1G
|
|
|
1346
1346
|
const deserializeAws_restJson1GetTraceGraphCommandError = async (output, context) => {
|
|
1347
1347
|
const parsedOutput = {
|
|
1348
1348
|
...output,
|
|
1349
|
-
body: await
|
|
1349
|
+
body: await parseErrorBody(output.body, context),
|
|
1350
1350
|
};
|
|
1351
1351
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1352
1352
|
switch (errorCode) {
|
|
@@ -1392,7 +1392,7 @@ exports.deserializeAws_restJson1GetTraceSummariesCommand = deserializeAws_restJs
|
|
|
1392
1392
|
const deserializeAws_restJson1GetTraceSummariesCommandError = async (output, context) => {
|
|
1393
1393
|
const parsedOutput = {
|
|
1394
1394
|
...output,
|
|
1395
|
-
body: await
|
|
1395
|
+
body: await parseErrorBody(output.body, context),
|
|
1396
1396
|
};
|
|
1397
1397
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1398
1398
|
switch (errorCode) {
|
|
@@ -1432,7 +1432,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
|
|
|
1432
1432
|
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
1433
1433
|
const parsedOutput = {
|
|
1434
1434
|
...output,
|
|
1435
|
-
body: await
|
|
1435
|
+
body: await parseErrorBody(output.body, context),
|
|
1436
1436
|
};
|
|
1437
1437
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1438
1438
|
switch (errorCode) {
|
|
@@ -1472,7 +1472,7 @@ exports.deserializeAws_restJson1PutEncryptionConfigCommand = deserializeAws_rest
|
|
|
1472
1472
|
const deserializeAws_restJson1PutEncryptionConfigCommandError = async (output, context) => {
|
|
1473
1473
|
const parsedOutput = {
|
|
1474
1474
|
...output,
|
|
1475
|
-
body: await
|
|
1475
|
+
body: await parseErrorBody(output.body, context),
|
|
1476
1476
|
};
|
|
1477
1477
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1478
1478
|
switch (errorCode) {
|
|
@@ -1506,7 +1506,7 @@ exports.deserializeAws_restJson1PutTelemetryRecordsCommand = deserializeAws_rest
|
|
|
1506
1506
|
const deserializeAws_restJson1PutTelemetryRecordsCommandError = async (output, context) => {
|
|
1507
1507
|
const parsedOutput = {
|
|
1508
1508
|
...output,
|
|
1509
|
-
body: await
|
|
1509
|
+
body: await parseErrorBody(output.body, context),
|
|
1510
1510
|
};
|
|
1511
1511
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1512
1512
|
switch (errorCode) {
|
|
@@ -1543,7 +1543,7 @@ exports.deserializeAws_restJson1PutTraceSegmentsCommand = deserializeAws_restJso
|
|
|
1543
1543
|
const deserializeAws_restJson1PutTraceSegmentsCommandError = async (output, context) => {
|
|
1544
1544
|
const parsedOutput = {
|
|
1545
1545
|
...output,
|
|
1546
|
-
body: await
|
|
1546
|
+
body: await parseErrorBody(output.body, context),
|
|
1547
1547
|
};
|
|
1548
1548
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1549
1549
|
switch (errorCode) {
|
|
@@ -1577,7 +1577,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
|
|
|
1577
1577
|
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
1578
1578
|
const parsedOutput = {
|
|
1579
1579
|
...output,
|
|
1580
|
-
body: await
|
|
1580
|
+
body: await parseErrorBody(output.body, context),
|
|
1581
1581
|
};
|
|
1582
1582
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1583
1583
|
switch (errorCode) {
|
|
@@ -1617,7 +1617,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
|
|
|
1617
1617
|
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
1618
1618
|
const parsedOutput = {
|
|
1619
1619
|
...output,
|
|
1620
|
-
body: await
|
|
1620
|
+
body: await parseErrorBody(output.body, context),
|
|
1621
1621
|
};
|
|
1622
1622
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1623
1623
|
switch (errorCode) {
|
|
@@ -1657,7 +1657,7 @@ exports.deserializeAws_restJson1UpdateGroupCommand = deserializeAws_restJson1Upd
|
|
|
1657
1657
|
const deserializeAws_restJson1UpdateGroupCommandError = async (output, context) => {
|
|
1658
1658
|
const parsedOutput = {
|
|
1659
1659
|
...output,
|
|
1660
|
-
body: await
|
|
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_restJson1UpdateSamplingRuleCommand = deserializeAws_restJ
|
|
|
1694
1694
|
const deserializeAws_restJson1UpdateSamplingRuleCommandError = async (output, context) => {
|
|
1695
1695
|
const parsedOutput = {
|
|
1696
1696
|
...output,
|
|
1697
|
-
body: await
|
|
1697
|
+
body: await parseErrorBody(output.body, context),
|
|
1698
1698
|
};
|
|
1699
1699
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1700
1700
|
switch (errorCode) {
|
|
@@ -2904,6 +2904,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
2904
2904
|
}
|
|
2905
2905
|
return {};
|
|
2906
2906
|
});
|
|
2907
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
2908
|
+
var _a;
|
|
2909
|
+
const value = await parseBody(errorBody, context);
|
|
2910
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
2911
|
+
return value;
|
|
2912
|
+
};
|
|
2907
2913
|
const loadRestJsonErrorCode = (output, data) => {
|
|
2908
2914
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2909
2915
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -704,7 +704,7 @@ var deserializeAws_restJson1BatchGetTracesCommandError = function (output, conte
|
|
|
704
704
|
case 0:
|
|
705
705
|
_a = [__assign({}, output)];
|
|
706
706
|
_c = {};
|
|
707
|
-
return [4,
|
|
707
|
+
return [4, parseErrorBody(output.body, context)];
|
|
708
708
|
case 1:
|
|
709
709
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
710
710
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -764,7 +764,7 @@ var deserializeAws_restJson1CreateGroupCommandError = function (output, context)
|
|
|
764
764
|
case 0:
|
|
765
765
|
_a = [__assign({}, output)];
|
|
766
766
|
_c = {};
|
|
767
|
-
return [4,
|
|
767
|
+
return [4, parseErrorBody(output.body, context)];
|
|
768
768
|
case 1:
|
|
769
769
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
770
770
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -824,7 +824,7 @@ var deserializeAws_restJson1CreateSamplingRuleCommandError = function (output, c
|
|
|
824
824
|
case 0:
|
|
825
825
|
_a = [__assign({}, output)];
|
|
826
826
|
_c = {};
|
|
827
|
-
return [4,
|
|
827
|
+
return [4, parseErrorBody(output.body, context)];
|
|
828
828
|
case 1:
|
|
829
829
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
830
830
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -883,7 +883,7 @@ var deserializeAws_restJson1DeleteGroupCommandError = function (output, context)
|
|
|
883
883
|
case 0:
|
|
884
884
|
_a = [__assign({}, output)];
|
|
885
885
|
_c = {};
|
|
886
|
-
return [4,
|
|
886
|
+
return [4, parseErrorBody(output.body, context)];
|
|
887
887
|
case 1:
|
|
888
888
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
889
889
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -943,7 +943,7 @@ var deserializeAws_restJson1DeleteSamplingRuleCommandError = function (output, c
|
|
|
943
943
|
case 0:
|
|
944
944
|
_a = [__assign({}, output)];
|
|
945
945
|
_c = {};
|
|
946
|
-
return [4,
|
|
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);
|
|
@@ -1003,7 +1003,7 @@ var deserializeAws_restJson1GetEncryptionConfigCommandError = function (output,
|
|
|
1003
1003
|
case 0:
|
|
1004
1004
|
_a = [__assign({}, output)];
|
|
1005
1005
|
_c = {};
|
|
1006
|
-
return [4,
|
|
1006
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1007
1007
|
case 1:
|
|
1008
1008
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1009
1009
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1063,7 +1063,7 @@ var deserializeAws_restJson1GetGroupCommandError = function (output, context) {
|
|
|
1063
1063
|
case 0:
|
|
1064
1064
|
_a = [__assign({}, output)];
|
|
1065
1065
|
_c = {};
|
|
1066
|
-
return [4,
|
|
1066
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1067
1067
|
case 1:
|
|
1068
1068
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1069
1069
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1126,7 +1126,7 @@ var deserializeAws_restJson1GetGroupsCommandError = function (output, context) {
|
|
|
1126
1126
|
case 0:
|
|
1127
1127
|
_a = [__assign({}, output)];
|
|
1128
1128
|
_c = {};
|
|
1129
|
-
return [4,
|
|
1129
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1130
1130
|
case 1:
|
|
1131
1131
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1132
1132
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1186,7 +1186,7 @@ var deserializeAws_restJson1GetInsightCommandError = function (output, context)
|
|
|
1186
1186
|
case 0:
|
|
1187
1187
|
_a = [__assign({}, output)];
|
|
1188
1188
|
_c = {};
|
|
1189
|
-
return [4,
|
|
1189
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1190
1190
|
case 1:
|
|
1191
1191
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1192
1192
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1249,7 +1249,7 @@ var deserializeAws_restJson1GetInsightEventsCommandError = function (output, con
|
|
|
1249
1249
|
case 0:
|
|
1250
1250
|
_a = [__assign({}, output)];
|
|
1251
1251
|
_c = {};
|
|
1252
|
-
return [4,
|
|
1252
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1253
1253
|
case 1:
|
|
1254
1254
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1255
1255
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1327,7 +1327,7 @@ var deserializeAws_restJson1GetInsightImpactGraphCommandError = function (output
|
|
|
1327
1327
|
case 0:
|
|
1328
1328
|
_a = [__assign({}, output)];
|
|
1329
1329
|
_c = {};
|
|
1330
|
-
return [4,
|
|
1330
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1331
1331
|
case 1:
|
|
1332
1332
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1333
1333
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1390,7 +1390,7 @@ var deserializeAws_restJson1GetInsightSummariesCommandError = function (output,
|
|
|
1390
1390
|
case 0:
|
|
1391
1391
|
_a = [__assign({}, output)];
|
|
1392
1392
|
_c = {};
|
|
1393
|
-
return [4,
|
|
1393
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1394
1394
|
case 1:
|
|
1395
1395
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1396
1396
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1453,7 +1453,7 @@ var deserializeAws_restJson1GetSamplingRulesCommandError = function (output, con
|
|
|
1453
1453
|
case 0:
|
|
1454
1454
|
_a = [__assign({}, output)];
|
|
1455
1455
|
_c = {};
|
|
1456
|
-
return [4,
|
|
1456
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1457
1457
|
case 1:
|
|
1458
1458
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1459
1459
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1516,7 +1516,7 @@ var deserializeAws_restJson1GetSamplingStatisticSummariesCommandError = function
|
|
|
1516
1516
|
case 0:
|
|
1517
1517
|
_a = [__assign({}, output)];
|
|
1518
1518
|
_c = {};
|
|
1519
|
-
return [4,
|
|
1519
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1520
1520
|
case 1:
|
|
1521
1521
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1522
1522
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1582,7 +1582,7 @@ var deserializeAws_restJson1GetSamplingTargetsCommandError = function (output, c
|
|
|
1582
1582
|
case 0:
|
|
1583
1583
|
_a = [__assign({}, output)];
|
|
1584
1584
|
_c = {};
|
|
1585
|
-
return [4,
|
|
1585
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1586
1586
|
case 1:
|
|
1587
1587
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1588
1588
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1654,7 +1654,7 @@ var deserializeAws_restJson1GetServiceGraphCommandError = function (output, cont
|
|
|
1654
1654
|
case 0:
|
|
1655
1655
|
_a = [__assign({}, output)];
|
|
1656
1656
|
_c = {};
|
|
1657
|
-
return [4,
|
|
1657
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1658
1658
|
case 1:
|
|
1659
1659
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1660
1660
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1720,7 +1720,7 @@ var deserializeAws_restJson1GetTimeSeriesServiceStatisticsCommandError = functio
|
|
|
1720
1720
|
case 0:
|
|
1721
1721
|
_a = [__assign({}, output)];
|
|
1722
1722
|
_c = {};
|
|
1723
|
-
return [4,
|
|
1723
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1724
1724
|
case 1:
|
|
1725
1725
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1726
1726
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1783,7 +1783,7 @@ var deserializeAws_restJson1GetTraceGraphCommandError = function (output, contex
|
|
|
1783
1783
|
case 0:
|
|
1784
1784
|
_a = [__assign({}, output)];
|
|
1785
1785
|
_c = {};
|
|
1786
|
-
return [4,
|
|
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);
|
|
@@ -1852,7 +1852,7 @@ var deserializeAws_restJson1GetTraceSummariesCommandError = function (output, co
|
|
|
1852
1852
|
case 0:
|
|
1853
1853
|
_a = [__assign({}, output)];
|
|
1854
1854
|
_c = {};
|
|
1855
|
-
return [4,
|
|
1855
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1856
1856
|
case 1:
|
|
1857
1857
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1858
1858
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1915,7 +1915,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
1915
1915
|
case 0:
|
|
1916
1916
|
_a = [__assign({}, output)];
|
|
1917
1917
|
_c = {};
|
|
1918
|
-
return [4,
|
|
1918
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1919
1919
|
case 1:
|
|
1920
1920
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1921
1921
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1979,7 +1979,7 @@ var deserializeAws_restJson1PutEncryptionConfigCommandError = function (output,
|
|
|
1979
1979
|
case 0:
|
|
1980
1980
|
_a = [__assign({}, output)];
|
|
1981
1981
|
_c = {};
|
|
1982
|
-
return [4,
|
|
1982
|
+
return [4, parseErrorBody(output.body, context)];
|
|
1983
1983
|
case 1:
|
|
1984
1984
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1985
1985
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2034,7 +2034,7 @@ var deserializeAws_restJson1PutTelemetryRecordsCommandError = function (output,
|
|
|
2034
2034
|
case 0:
|
|
2035
2035
|
_a = [__assign({}, output)];
|
|
2036
2036
|
_c = {};
|
|
2037
|
-
return [4,
|
|
2037
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2038
2038
|
case 1:
|
|
2039
2039
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2040
2040
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2094,7 +2094,7 @@ var deserializeAws_restJson1PutTraceSegmentsCommandError = function (output, con
|
|
|
2094
2094
|
case 0:
|
|
2095
2095
|
_a = [__assign({}, output)];
|
|
2096
2096
|
_c = {};
|
|
2097
|
-
return [4,
|
|
2097
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2098
2098
|
case 1:
|
|
2099
2099
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2100
2100
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2149,7 +2149,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
|
|
|
2149
2149
|
case 0:
|
|
2150
2150
|
_a = [__assign({}, output)];
|
|
2151
2151
|
_c = {};
|
|
2152
|
-
return [4,
|
|
2152
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2153
2153
|
case 1:
|
|
2154
2154
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2155
2155
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2212,7 +2212,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
|
|
|
2212
2212
|
case 0:
|
|
2213
2213
|
_a = [__assign({}, output)];
|
|
2214
2214
|
_c = {};
|
|
2215
|
-
return [4,
|
|
2215
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2216
2216
|
case 1:
|
|
2217
2217
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2218
2218
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2276,7 +2276,7 @@ var deserializeAws_restJson1UpdateGroupCommandError = function (output, context)
|
|
|
2276
2276
|
case 0:
|
|
2277
2277
|
_a = [__assign({}, output)];
|
|
2278
2278
|
_c = {};
|
|
2279
|
-
return [4,
|
|
2279
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2280
2280
|
case 1:
|
|
2281
2281
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2282
2282
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -2336,7 +2336,7 @@ var deserializeAws_restJson1UpdateSamplingRuleCommandError = function (output, c
|
|
|
2336
2336
|
case 0:
|
|
2337
2337
|
_a = [__assign({}, output)];
|
|
2338
2338
|
_c = {};
|
|
2339
|
-
return [4,
|
|
2339
|
+
return [4, parseErrorBody(output.body, context)];
|
|
2340
2340
|
case 1:
|
|
2341
2341
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2342
2342
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -3502,6 +3502,19 @@ var parseBody = function (streamBody, context) {
|
|
|
3502
3502
|
return {};
|
|
3503
3503
|
});
|
|
3504
3504
|
};
|
|
3505
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3506
|
+
var value;
|
|
3507
|
+
var _a;
|
|
3508
|
+
return __generator(this, function (_b) {
|
|
3509
|
+
switch (_b.label) {
|
|
3510
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
3511
|
+
case 1:
|
|
3512
|
+
value = _b.sent();
|
|
3513
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
3514
|
+
return [2, value];
|
|
3515
|
+
}
|
|
3516
|
+
});
|
|
3517
|
+
}); };
|
|
3505
3518
|
var loadRestJsonErrorCode = function (output, data) {
|
|
3506
3519
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
3507
3520
|
var sanitizeErrorCode = function (rawValue) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-xray",
|
|
3
3
|
"description": "AWS SDK for JavaScript Xray Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
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.
|
|
22
|
+
"@aws-sdk/client-sts": "3.181.0",
|
|
23
23
|
"@aws-sdk/config-resolver": "3.178.0",
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
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",
|