@aws-sdk/client-lex-runtime-service 3.180.0 → 3.181.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
|
|
12
|
+
* **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
# [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @aws-sdk/client-lex-runtime-service
|
|
@@ -185,7 +185,7 @@ exports.deserializeAws_restJson1DeleteSessionCommand = deserializeAws_restJson1D
|
|
|
185
185
|
const deserializeAws_restJson1DeleteSessionCommandError = async (output, context) => {
|
|
186
186
|
const parsedOutput = {
|
|
187
187
|
...output,
|
|
188
|
-
body: await
|
|
188
|
+
body: await parseErrorBody(output.body, context),
|
|
189
189
|
};
|
|
190
190
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
191
191
|
switch (errorCode) {
|
|
@@ -243,7 +243,7 @@ exports.deserializeAws_restJson1GetSessionCommand = deserializeAws_restJson1GetS
|
|
|
243
243
|
const deserializeAws_restJson1GetSessionCommandError = async (output, context) => {
|
|
244
244
|
const parsedOutput = {
|
|
245
245
|
...output,
|
|
246
|
-
body: await
|
|
246
|
+
body: await parseErrorBody(output.body, context),
|
|
247
247
|
};
|
|
248
248
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
249
249
|
switch (errorCode) {
|
|
@@ -316,7 +316,7 @@ exports.deserializeAws_restJson1PostContentCommand = deserializeAws_restJson1Pos
|
|
|
316
316
|
const deserializeAws_restJson1PostContentCommandError = async (output, context) => {
|
|
317
317
|
const parsedOutput = {
|
|
318
318
|
...output,
|
|
319
|
-
body: await
|
|
319
|
+
body: await parseErrorBody(output.body, context),
|
|
320
320
|
};
|
|
321
321
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
322
322
|
switch (errorCode) {
|
|
@@ -419,7 +419,7 @@ exports.deserializeAws_restJson1PostTextCommand = deserializeAws_restJson1PostTe
|
|
|
419
419
|
const deserializeAws_restJson1PostTextCommandError = async (output, context) => {
|
|
420
420
|
const parsedOutput = {
|
|
421
421
|
...output,
|
|
422
|
-
body: await
|
|
422
|
+
body: await parseErrorBody(output.body, context),
|
|
423
423
|
};
|
|
424
424
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
425
425
|
switch (errorCode) {
|
|
@@ -492,7 +492,7 @@ exports.deserializeAws_restJson1PutSessionCommand = deserializeAws_restJson1PutS
|
|
|
492
492
|
const deserializeAws_restJson1PutSessionCommandError = async (output, context) => {
|
|
493
493
|
const parsedOutput = {
|
|
494
494
|
...output,
|
|
495
|
-
body: await
|
|
495
|
+
body: await parseErrorBody(output.body, context),
|
|
496
496
|
};
|
|
497
497
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
498
498
|
switch (errorCode) {
|
|
@@ -927,6 +927,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
927
927
|
}
|
|
928
928
|
return {};
|
|
929
929
|
});
|
|
930
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
931
|
+
var _a;
|
|
932
|
+
const value = await parseBody(errorBody, context);
|
|
933
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
934
|
+
return value;
|
|
935
|
+
};
|
|
930
936
|
const loadRestJsonErrorCode = (output, data) => {
|
|
931
937
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
932
938
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -212,7 +212,7 @@ var deserializeAws_restJson1DeleteSessionCommandError = function (output, contex
|
|
|
212
212
|
case 0:
|
|
213
213
|
_a = [__assign({}, output)];
|
|
214
214
|
_c = {};
|
|
215
|
-
return [4,
|
|
215
|
+
return [4, parseErrorBody(output.body, context)];
|
|
216
216
|
case 1:
|
|
217
217
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
218
218
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -296,7 +296,7 @@ var deserializeAws_restJson1GetSessionCommandError = function (output, context)
|
|
|
296
296
|
case 0:
|
|
297
297
|
_a = [__assign({}, output)];
|
|
298
298
|
_c = {};
|
|
299
|
-
return [4,
|
|
299
|
+
return [4, parseErrorBody(output.body, context)];
|
|
300
300
|
case 1:
|
|
301
301
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
302
302
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -397,7 +397,7 @@ var deserializeAws_restJson1PostContentCommandError = function (output, context)
|
|
|
397
397
|
case 0:
|
|
398
398
|
_a = [__assign({}, output)];
|
|
399
399
|
_c = {};
|
|
400
|
-
return [4,
|
|
400
|
+
return [4, parseErrorBody(output.body, context)];
|
|
401
401
|
case 1:
|
|
402
402
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
403
403
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -532,7 +532,7 @@ var deserializeAws_restJson1PostTextCommandError = function (output, context) {
|
|
|
532
532
|
case 0:
|
|
533
533
|
_a = [__assign({}, output)];
|
|
534
534
|
_c = {};
|
|
535
|
-
return [4,
|
|
535
|
+
return [4, parseErrorBody(output.body, context)];
|
|
536
536
|
case 1:
|
|
537
537
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
538
538
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -633,7 +633,7 @@ var deserializeAws_restJson1PutSessionCommandError = function (output, context)
|
|
|
633
633
|
case 0:
|
|
634
634
|
_a = [__assign({}, output)];
|
|
635
635
|
_c = {};
|
|
636
|
-
return [4,
|
|
636
|
+
return [4, parseErrorBody(output.body, context)];
|
|
637
637
|
case 1:
|
|
638
638
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
639
639
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -1063,6 +1063,19 @@ var parseBody = function (streamBody, context) {
|
|
|
1063
1063
|
return {};
|
|
1064
1064
|
});
|
|
1065
1065
|
};
|
|
1066
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1067
|
+
var value;
|
|
1068
|
+
var _a;
|
|
1069
|
+
return __generator(this, function (_b) {
|
|
1070
|
+
switch (_b.label) {
|
|
1071
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
1072
|
+
case 1:
|
|
1073
|
+
value = _b.sent();
|
|
1074
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1075
|
+
return [2, value];
|
|
1076
|
+
}
|
|
1077
|
+
});
|
|
1078
|
+
}); };
|
|
1066
1079
|
var loadRestJsonErrorCode = function (output, data) {
|
|
1067
1080
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1068
1081
|
var sanitizeErrorCode = function (rawValue) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-lex-runtime-service",
|
|
3
3
|
"description": "AWS SDK for JavaScript Lex Runtime Service 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",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.181.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.178.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.181.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.178.0",
|
|
28
28
|
"@aws-sdk/hash-node": "3.178.0",
|
|
29
29
|
"@aws-sdk/invalid-dependency": "3.178.0",
|