@aws-sdk/client-sagemaker-a2i-runtime 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-sagemaker-a2i-runtime
|
|
@@ -133,7 +133,7 @@ exports.deserializeAws_restJson1DeleteHumanLoopCommand = deserializeAws_restJson
|
|
|
133
133
|
const deserializeAws_restJson1DeleteHumanLoopCommandError = async (output, context) => {
|
|
134
134
|
const parsedOutput = {
|
|
135
135
|
...output,
|
|
136
|
-
body: await
|
|
136
|
+
body: await parseErrorBody(output.body, context),
|
|
137
137
|
};
|
|
138
138
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
139
139
|
switch (errorCode) {
|
|
@@ -197,7 +197,7 @@ exports.deserializeAws_restJson1DescribeHumanLoopCommand = deserializeAws_restJs
|
|
|
197
197
|
const deserializeAws_restJson1DescribeHumanLoopCommandError = async (output, context) => {
|
|
198
198
|
const parsedOutput = {
|
|
199
199
|
...output,
|
|
200
|
-
body: await
|
|
200
|
+
body: await parseErrorBody(output.body, context),
|
|
201
201
|
};
|
|
202
202
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
203
203
|
switch (errorCode) {
|
|
@@ -243,7 +243,7 @@ exports.deserializeAws_restJson1ListHumanLoopsCommand = deserializeAws_restJson1
|
|
|
243
243
|
const deserializeAws_restJson1ListHumanLoopsCommandError = 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) {
|
|
@@ -286,7 +286,7 @@ exports.deserializeAws_restJson1StartHumanLoopCommand = deserializeAws_restJson1
|
|
|
286
286
|
const deserializeAws_restJson1StartHumanLoopCommandError = async (output, context) => {
|
|
287
287
|
const parsedOutput = {
|
|
288
288
|
...output,
|
|
289
|
-
body: await
|
|
289
|
+
body: await parseErrorBody(output.body, context),
|
|
290
290
|
};
|
|
291
291
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
292
292
|
switch (errorCode) {
|
|
@@ -329,7 +329,7 @@ exports.deserializeAws_restJson1StopHumanLoopCommand = deserializeAws_restJson1S
|
|
|
329
329
|
const deserializeAws_restJson1StopHumanLoopCommandError = async (output, context) => {
|
|
330
330
|
const parsedOutput = {
|
|
331
331
|
...output,
|
|
332
|
-
body: await
|
|
332
|
+
body: await parseErrorBody(output.body, context),
|
|
333
333
|
};
|
|
334
334
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
335
335
|
switch (errorCode) {
|
|
@@ -499,6 +499,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
499
499
|
}
|
|
500
500
|
return {};
|
|
501
501
|
});
|
|
502
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
503
|
+
var _a;
|
|
504
|
+
const value = await parseBody(errorBody, context);
|
|
505
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
506
|
+
return value;
|
|
507
|
+
};
|
|
502
508
|
const loadRestJsonErrorCode = (output, data) => {
|
|
503
509
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
504
510
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -161,7 +161,7 @@ var deserializeAws_restJson1DeleteHumanLoopCommandError = function (output, cont
|
|
|
161
161
|
case 0:
|
|
162
162
|
_a = [__assign({}, output)];
|
|
163
163
|
_c = {};
|
|
164
|
-
return [4,
|
|
164
|
+
return [4, parseErrorBody(output.body, context)];
|
|
165
165
|
case 1:
|
|
166
166
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
167
167
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -250,7 +250,7 @@ var deserializeAws_restJson1DescribeHumanLoopCommandError = function (output, co
|
|
|
250
250
|
case 0:
|
|
251
251
|
_a = [__assign({}, output)];
|
|
252
252
|
_c = {};
|
|
253
|
-
return [4,
|
|
253
|
+
return [4, parseErrorBody(output.body, context)];
|
|
254
254
|
case 1:
|
|
255
255
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
256
256
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -321,7 +321,7 @@ var deserializeAws_restJson1ListHumanLoopsCommandError = function (output, conte
|
|
|
321
321
|
case 0:
|
|
322
322
|
_a = [__assign({}, output)];
|
|
323
323
|
_c = {};
|
|
324
|
-
return [4,
|
|
324
|
+
return [4, parseErrorBody(output.body, context)];
|
|
325
325
|
case 1:
|
|
326
326
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
327
327
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -389,7 +389,7 @@ var deserializeAws_restJson1StartHumanLoopCommandError = function (output, conte
|
|
|
389
389
|
case 0:
|
|
390
390
|
_a = [__assign({}, output)];
|
|
391
391
|
_c = {};
|
|
392
|
-
return [4,
|
|
392
|
+
return [4, parseErrorBody(output.body, context)];
|
|
393
393
|
case 1:
|
|
394
394
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
395
395
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -456,7 +456,7 @@ var deserializeAws_restJson1StopHumanLoopCommandError = function (output, contex
|
|
|
456
456
|
case 0:
|
|
457
457
|
_a = [__assign({}, output)];
|
|
458
458
|
_c = {};
|
|
459
|
-
return [4,
|
|
459
|
+
return [4, parseErrorBody(output.body, context)];
|
|
460
460
|
case 1:
|
|
461
461
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
462
462
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -640,6 +640,19 @@ var parseBody = function (streamBody, context) {
|
|
|
640
640
|
return {};
|
|
641
641
|
});
|
|
642
642
|
};
|
|
643
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
644
|
+
var value;
|
|
645
|
+
var _a;
|
|
646
|
+
return __generator(this, function (_b) {
|
|
647
|
+
switch (_b.label) {
|
|
648
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
649
|
+
case 1:
|
|
650
|
+
value = _b.sent();
|
|
651
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
652
|
+
return [2, value];
|
|
653
|
+
}
|
|
654
|
+
});
|
|
655
|
+
}); };
|
|
643
656
|
var loadRestJsonErrorCode = function (output, data) {
|
|
644
657
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
645
658
|
var sanitizeErrorCode = function (rawValue) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sagemaker-a2i-runtime",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sagemaker A2i Runtime 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",
|