@aws-sdk/client-lex-runtime-v2 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-lex-runtime-v2
|
|
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-lex-runtime-v2
|
|
@@ -194,7 +194,7 @@ exports.deserializeAws_restJson1DeleteSessionCommand = deserializeAws_restJson1D
|
|
|
194
194
|
const deserializeAws_restJson1DeleteSessionCommandError = async (output, context) => {
|
|
195
195
|
const parsedOutput = {
|
|
196
196
|
...output,
|
|
197
|
-
body: await
|
|
197
|
+
body: await parseErrorBody(output.body, context),
|
|
198
198
|
};
|
|
199
199
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
200
200
|
switch (errorCode) {
|
|
@@ -252,7 +252,7 @@ exports.deserializeAws_restJson1GetSessionCommand = deserializeAws_restJson1GetS
|
|
|
252
252
|
const deserializeAws_restJson1GetSessionCommandError = async (output, context) => {
|
|
253
253
|
const parsedOutput = {
|
|
254
254
|
...output,
|
|
255
|
-
body: await
|
|
255
|
+
body: await parseErrorBody(output.body, context),
|
|
256
256
|
};
|
|
257
257
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
258
258
|
switch (errorCode) {
|
|
@@ -301,7 +301,7 @@ exports.deserializeAws_restJson1PutSessionCommand = deserializeAws_restJson1PutS
|
|
|
301
301
|
const deserializeAws_restJson1PutSessionCommandError = async (output, context) => {
|
|
302
302
|
const parsedOutput = {
|
|
303
303
|
...output,
|
|
304
|
-
body: await
|
|
304
|
+
body: await parseErrorBody(output.body, context),
|
|
305
305
|
};
|
|
306
306
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
307
307
|
switch (errorCode) {
|
|
@@ -368,7 +368,7 @@ exports.deserializeAws_restJson1RecognizeTextCommand = deserializeAws_restJson1R
|
|
|
368
368
|
const deserializeAws_restJson1RecognizeTextCommandError = async (output, context) => {
|
|
369
369
|
const parsedOutput = {
|
|
370
370
|
...output,
|
|
371
|
-
body: await
|
|
371
|
+
body: await parseErrorBody(output.body, context),
|
|
372
372
|
};
|
|
373
373
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
374
374
|
switch (errorCode) {
|
|
@@ -429,7 +429,7 @@ exports.deserializeAws_restJson1RecognizeUtteranceCommand = deserializeAws_restJ
|
|
|
429
429
|
const deserializeAws_restJson1RecognizeUtteranceCommandError = async (output, context) => {
|
|
430
430
|
const parsedOutput = {
|
|
431
431
|
...output,
|
|
432
|
-
body: await
|
|
432
|
+
body: await parseErrorBody(output.body, context),
|
|
433
433
|
};
|
|
434
434
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
435
435
|
switch (errorCode) {
|
|
@@ -482,7 +482,7 @@ exports.deserializeAws_restJson1StartConversationCommand = deserializeAws_restJs
|
|
|
482
482
|
const deserializeAws_restJson1StartConversationCommandError = async (output, context) => {
|
|
483
483
|
const parsedOutput = {
|
|
484
484
|
...output,
|
|
485
|
-
body: await
|
|
485
|
+
body: await parseErrorBody(output.body, context),
|
|
486
486
|
};
|
|
487
487
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
488
488
|
switch (errorCode) {
|
|
@@ -1466,6 +1466,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
1466
1466
|
}
|
|
1467
1467
|
return {};
|
|
1468
1468
|
});
|
|
1469
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1470
|
+
var _a;
|
|
1471
|
+
const value = await parseBody(errorBody, context);
|
|
1472
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1473
|
+
return value;
|
|
1474
|
+
};
|
|
1469
1475
|
const loadRestJsonErrorCode = (output, data) => {
|
|
1470
1476
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1471
1477
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -228,7 +228,7 @@ var deserializeAws_restJson1DeleteSessionCommandError = function (output, contex
|
|
|
228
228
|
case 0:
|
|
229
229
|
_a = [__assign({}, output)];
|
|
230
230
|
_c = {};
|
|
231
|
-
return [4,
|
|
231
|
+
return [4, parseErrorBody(output.body, context)];
|
|
232
232
|
case 1:
|
|
233
233
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
234
234
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -313,7 +313,7 @@ var deserializeAws_restJson1GetSessionCommandError = function (output, context)
|
|
|
313
313
|
case 0:
|
|
314
314
|
_a = [__assign({}, output)];
|
|
315
315
|
_c = {};
|
|
316
|
-
return [4,
|
|
316
|
+
return [4, parseErrorBody(output.body, context)];
|
|
317
317
|
case 1:
|
|
318
318
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
319
319
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -381,7 +381,7 @@ var deserializeAws_restJson1PutSessionCommandError = function (output, context)
|
|
|
381
381
|
case 0:
|
|
382
382
|
_a = [__assign({}, output)];
|
|
383
383
|
_c = {};
|
|
384
|
-
return [4,
|
|
384
|
+
return [4, parseErrorBody(output.body, context)];
|
|
385
385
|
case 1:
|
|
386
386
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
387
387
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -477,7 +477,7 @@ var deserializeAws_restJson1RecognizeTextCommandError = function (output, contex
|
|
|
477
477
|
case 0:
|
|
478
478
|
_a = [__assign({}, output)];
|
|
479
479
|
_c = {};
|
|
480
|
-
return [4,
|
|
480
|
+
return [4, parseErrorBody(output.body, context)];
|
|
481
481
|
case 1:
|
|
482
482
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
483
483
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -560,7 +560,7 @@ var deserializeAws_restJson1RecognizeUtteranceCommandError = function (output, c
|
|
|
560
560
|
case 0:
|
|
561
561
|
_a = [__assign({}, output)];
|
|
562
562
|
_c = {};
|
|
563
|
-
return [4,
|
|
563
|
+
return [4, parseErrorBody(output.body, context)];
|
|
564
564
|
case 1:
|
|
565
565
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
566
566
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -635,7 +635,7 @@ var deserializeAws_restJson1StartConversationCommandError = function (output, co
|
|
|
635
635
|
case 0:
|
|
636
636
|
_a = [__assign({}, output)];
|
|
637
637
|
_c = {};
|
|
638
|
-
return [4,
|
|
638
|
+
return [4, parseErrorBody(output.body, context)];
|
|
639
639
|
case 1:
|
|
640
640
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
641
641
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1678,6 +1678,19 @@ var parseBody = function (streamBody, context) {
|
|
|
1678
1678
|
return {};
|
|
1679
1679
|
});
|
|
1680
1680
|
};
|
|
1681
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1682
|
+
var value;
|
|
1683
|
+
var _a;
|
|
1684
|
+
return __generator(this, function (_b) {
|
|
1685
|
+
switch (_b.label) {
|
|
1686
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
1687
|
+
case 1:
|
|
1688
|
+
value = _b.sent();
|
|
1689
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1690
|
+
return [2, value];
|
|
1691
|
+
}
|
|
1692
|
+
});
|
|
1693
|
+
}); };
|
|
1681
1694
|
var loadRestJsonErrorCode = function (output, data) {
|
|
1682
1695
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1683
1696
|
var sanitizeErrorCode = function (rawValue) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-lex-runtime-v2",
|
|
3
3
|
"description": "AWS SDK for JavaScript Lex Runtime V2 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/eventstream-handler-node": "3.178.0",
|
|
26
26
|
"@aws-sdk/eventstream-serde-browser": "3.178.0",
|
|
27
27
|
"@aws-sdk/eventstream-serde-config-resolver": "3.178.0",
|
|
@@ -42,15 +42,15 @@
|
|
|
42
42
|
"@aws-sdk/node-config-provider": "3.178.0",
|
|
43
43
|
"@aws-sdk/node-http-handler": "3.178.0",
|
|
44
44
|
"@aws-sdk/protocol-http": "3.178.0",
|
|
45
|
-
"@aws-sdk/smithy-client": "3.
|
|
45
|
+
"@aws-sdk/smithy-client": "3.180.0",
|
|
46
46
|
"@aws-sdk/types": "3.178.0",
|
|
47
47
|
"@aws-sdk/url-parser": "3.178.0",
|
|
48
48
|
"@aws-sdk/util-base64-browser": "3.170.0",
|
|
49
49
|
"@aws-sdk/util-base64-node": "3.170.0",
|
|
50
50
|
"@aws-sdk/util-body-length-browser": "3.170.0",
|
|
51
51
|
"@aws-sdk/util-body-length-node": "3.170.0",
|
|
52
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
53
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
52
|
+
"@aws-sdk/util-defaults-mode-browser": "3.180.0",
|
|
53
|
+
"@aws-sdk/util-defaults-mode-node": "3.180.0",
|
|
54
54
|
"@aws-sdk/util-user-agent-browser": "3.178.0",
|
|
55
55
|
"@aws-sdk/util-user-agent-node": "3.178.0",
|
|
56
56
|
"@aws-sdk/util-utf8-browser": "3.170.0",
|