@aws-sdk/client-rum 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 +16 -10
- package/dist-es/protocols/Aws_restJson1.js +23 -10
- 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-rum
|
|
@@ -249,7 +249,7 @@ exports.deserializeAws_restJson1CreateAppMonitorCommand = deserializeAws_restJso
|
|
|
249
249
|
const deserializeAws_restJson1CreateAppMonitorCommandError = async (output, context) => {
|
|
250
250
|
const parsedOutput = {
|
|
251
251
|
...output,
|
|
252
|
-
body: await
|
|
252
|
+
body: await parseErrorBody(output.body, context),
|
|
253
253
|
};
|
|
254
254
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
255
255
|
switch (errorCode) {
|
|
@@ -295,7 +295,7 @@ exports.deserializeAws_restJson1DeleteAppMonitorCommand = deserializeAws_restJso
|
|
|
295
295
|
const deserializeAws_restJson1DeleteAppMonitorCommandError = async (output, context) => {
|
|
296
296
|
const parsedOutput = {
|
|
297
297
|
...output,
|
|
298
|
-
body: await
|
|
298
|
+
body: await parseErrorBody(output.body, context),
|
|
299
299
|
};
|
|
300
300
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
301
301
|
switch (errorCode) {
|
|
@@ -344,7 +344,7 @@ exports.deserializeAws_restJson1GetAppMonitorCommand = deserializeAws_restJson1G
|
|
|
344
344
|
const deserializeAws_restJson1GetAppMonitorCommandError = async (output, context) => {
|
|
345
345
|
const parsedOutput = {
|
|
346
346
|
...output,
|
|
347
|
-
body: await
|
|
347
|
+
body: await parseErrorBody(output.body, context),
|
|
348
348
|
};
|
|
349
349
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
350
350
|
switch (errorCode) {
|
|
@@ -393,7 +393,7 @@ exports.deserializeAws_restJson1GetAppMonitorDataCommand = deserializeAws_restJs
|
|
|
393
393
|
const deserializeAws_restJson1GetAppMonitorDataCommandError = async (output, context) => {
|
|
394
394
|
const parsedOutput = {
|
|
395
395
|
...output,
|
|
396
|
-
body: await
|
|
396
|
+
body: await parseErrorBody(output.body, context),
|
|
397
397
|
};
|
|
398
398
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
399
399
|
switch (errorCode) {
|
|
@@ -442,7 +442,7 @@ exports.deserializeAws_restJson1ListAppMonitorsCommand = deserializeAws_restJson
|
|
|
442
442
|
const deserializeAws_restJson1ListAppMonitorsCommandError = async (output, context) => {
|
|
443
443
|
const parsedOutput = {
|
|
444
444
|
...output,
|
|
445
|
-
body: await
|
|
445
|
+
body: await parseErrorBody(output.body, context),
|
|
446
446
|
};
|
|
447
447
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
448
448
|
switch (errorCode) {
|
|
@@ -488,7 +488,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
|
|
|
488
488
|
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
489
489
|
const parsedOutput = {
|
|
490
490
|
...output,
|
|
491
|
-
body: await
|
|
491
|
+
body: await parseErrorBody(output.body, context),
|
|
492
492
|
};
|
|
493
493
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
494
494
|
switch (errorCode) {
|
|
@@ -525,7 +525,7 @@ exports.deserializeAws_restJson1PutRumEventsCommand = deserializeAws_restJson1Pu
|
|
|
525
525
|
const deserializeAws_restJson1PutRumEventsCommandError = async (output, context) => {
|
|
526
526
|
const parsedOutput = {
|
|
527
527
|
...output,
|
|
528
|
-
body: await
|
|
528
|
+
body: await parseErrorBody(output.body, context),
|
|
529
529
|
};
|
|
530
530
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
531
531
|
switch (errorCode) {
|
|
@@ -568,7 +568,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
|
|
|
568
568
|
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
569
569
|
const parsedOutput = {
|
|
570
570
|
...output,
|
|
571
|
-
body: await
|
|
571
|
+
body: await parseErrorBody(output.body, context),
|
|
572
572
|
};
|
|
573
573
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
574
574
|
switch (errorCode) {
|
|
@@ -605,7 +605,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
|
|
|
605
605
|
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
606
606
|
const parsedOutput = {
|
|
607
607
|
...output,
|
|
608
|
-
body: await
|
|
608
|
+
body: await parseErrorBody(output.body, context),
|
|
609
609
|
};
|
|
610
610
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
611
611
|
switch (errorCode) {
|
|
@@ -642,7 +642,7 @@ exports.deserializeAws_restJson1UpdateAppMonitorCommand = deserializeAws_restJso
|
|
|
642
642
|
const deserializeAws_restJson1UpdateAppMonitorCommandError = async (output, context) => {
|
|
643
643
|
const parsedOutput = {
|
|
644
644
|
...output,
|
|
645
|
-
body: await
|
|
645
|
+
body: await parseErrorBody(output.body, context),
|
|
646
646
|
};
|
|
647
647
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
648
648
|
switch (errorCode) {
|
|
@@ -1030,6 +1030,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
1030
1030
|
}
|
|
1031
1031
|
return {};
|
|
1032
1032
|
});
|
|
1033
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1034
|
+
var _a;
|
|
1035
|
+
const value = await parseBody(errorBody, context);
|
|
1036
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1037
|
+
return value;
|
|
1038
|
+
};
|
|
1033
1039
|
const loadRestJsonErrorCode = (output, data) => {
|
|
1034
1040
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1035
1041
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -291,7 +291,7 @@ var deserializeAws_restJson1CreateAppMonitorCommandError = function (output, con
|
|
|
291
291
|
case 0:
|
|
292
292
|
_a = [__assign({}, output)];
|
|
293
293
|
_c = {};
|
|
294
|
-
return [4,
|
|
294
|
+
return [4, parseErrorBody(output.body, context)];
|
|
295
295
|
case 1:
|
|
296
296
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
297
297
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -362,7 +362,7 @@ var deserializeAws_restJson1DeleteAppMonitorCommandError = function (output, con
|
|
|
362
362
|
case 0:
|
|
363
363
|
_a = [__assign({}, output)];
|
|
364
364
|
_c = {};
|
|
365
|
-
return [4,
|
|
365
|
+
return [4, parseErrorBody(output.body, context)];
|
|
366
366
|
case 1:
|
|
367
367
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
368
368
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -438,7 +438,7 @@ var deserializeAws_restJson1GetAppMonitorCommandError = function (output, contex
|
|
|
438
438
|
case 0:
|
|
439
439
|
_a = [__assign({}, output)];
|
|
440
440
|
_c = {};
|
|
441
|
-
return [4,
|
|
441
|
+
return [4, parseErrorBody(output.body, context)];
|
|
442
442
|
case 1:
|
|
443
443
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
444
444
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -513,7 +513,7 @@ var deserializeAws_restJson1GetAppMonitorDataCommandError = function (output, co
|
|
|
513
513
|
case 0:
|
|
514
514
|
_a = [__assign({}, output)];
|
|
515
515
|
_c = {};
|
|
516
|
-
return [4,
|
|
516
|
+
return [4, parseErrorBody(output.body, context)];
|
|
517
517
|
case 1:
|
|
518
518
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
519
519
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -588,7 +588,7 @@ var deserializeAws_restJson1ListAppMonitorsCommandError = function (output, cont
|
|
|
588
588
|
case 0:
|
|
589
589
|
_a = [__assign({}, output)];
|
|
590
590
|
_c = {};
|
|
591
|
-
return [4,
|
|
591
|
+
return [4, parseErrorBody(output.body, context)];
|
|
592
592
|
case 1:
|
|
593
593
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
594
594
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -659,7 +659,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
659
659
|
case 0:
|
|
660
660
|
_a = [__assign({}, output)];
|
|
661
661
|
_c = {};
|
|
662
|
-
return [4,
|
|
662
|
+
return [4, parseErrorBody(output.body, context)];
|
|
663
663
|
case 1:
|
|
664
664
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
665
665
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -718,7 +718,7 @@ var deserializeAws_restJson1PutRumEventsCommandError = function (output, context
|
|
|
718
718
|
case 0:
|
|
719
719
|
_a = [__assign({}, output)];
|
|
720
720
|
_c = {};
|
|
721
|
-
return [4,
|
|
721
|
+
return [4, parseErrorBody(output.body, context)];
|
|
722
722
|
case 1:
|
|
723
723
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
724
724
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -785,7 +785,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
|
|
|
785
785
|
case 0:
|
|
786
786
|
_a = [__assign({}, output)];
|
|
787
787
|
_c = {};
|
|
788
|
-
return [4,
|
|
788
|
+
return [4, parseErrorBody(output.body, context)];
|
|
789
789
|
case 1:
|
|
790
790
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
791
791
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -844,7 +844,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
|
|
|
844
844
|
case 0:
|
|
845
845
|
_a = [__assign({}, output)];
|
|
846
846
|
_c = {};
|
|
847
|
-
return [4,
|
|
847
|
+
return [4, parseErrorBody(output.body, context)];
|
|
848
848
|
case 1:
|
|
849
849
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
850
850
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -903,7 +903,7 @@ var deserializeAws_restJson1UpdateAppMonitorCommandError = function (output, con
|
|
|
903
903
|
case 0:
|
|
904
904
|
_a = [__assign({}, output)];
|
|
905
905
|
_c = {};
|
|
906
|
-
return [4,
|
|
906
|
+
return [4, parseErrorBody(output.body, context)];
|
|
907
907
|
case 1:
|
|
908
908
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
909
909
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1280,6 +1280,19 @@ var parseBody = function (streamBody, context) {
|
|
|
1280
1280
|
return {};
|
|
1281
1281
|
});
|
|
1282
1282
|
};
|
|
1283
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1284
|
+
var value;
|
|
1285
|
+
var _a;
|
|
1286
|
+
return __generator(this, function (_b) {
|
|
1287
|
+
switch (_b.label) {
|
|
1288
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
1289
|
+
case 1:
|
|
1290
|
+
value = _b.sent();
|
|
1291
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1292
|
+
return [2, value];
|
|
1293
|
+
}
|
|
1294
|
+
});
|
|
1295
|
+
}); };
|
|
1283
1296
|
var loadRestJsonErrorCode = function (output, data) {
|
|
1284
1297
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1285
1298
|
var sanitizeErrorCode = function (rawValue) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-rum",
|
|
3
3
|
"description": "AWS SDK for JavaScript Rum 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",
|