@aws-sdk/client-sagemaker-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-runtime
|
|
@@ -79,7 +79,7 @@ exports.deserializeAws_restJson1InvokeEndpointCommand = deserializeAws_restJson1
|
|
|
79
79
|
const deserializeAws_restJson1InvokeEndpointCommandError = async (output, context) => {
|
|
80
80
|
const parsedOutput = {
|
|
81
81
|
...output,
|
|
82
|
-
body: await
|
|
82
|
+
body: await parseErrorBody(output.body, context),
|
|
83
83
|
};
|
|
84
84
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
85
85
|
switch (errorCode) {
|
|
@@ -129,7 +129,7 @@ exports.deserializeAws_restJson1InvokeEndpointAsyncCommand = deserializeAws_rest
|
|
|
129
129
|
const deserializeAws_restJson1InvokeEndpointAsyncCommandError = async (output, context) => {
|
|
130
130
|
const parsedOutput = {
|
|
131
131
|
...output,
|
|
132
|
-
body: await
|
|
132
|
+
body: await parseErrorBody(output.body, context),
|
|
133
133
|
};
|
|
134
134
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
135
135
|
switch (errorCode) {
|
|
@@ -261,6 +261,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
261
261
|
}
|
|
262
262
|
return {};
|
|
263
263
|
});
|
|
264
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
265
|
+
var _a;
|
|
266
|
+
const value = await parseBody(errorBody, context);
|
|
267
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
268
|
+
return value;
|
|
269
|
+
};
|
|
264
270
|
const loadRestJsonErrorCode = (output, data) => {
|
|
265
271
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
266
272
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -99,7 +99,7 @@ var deserializeAws_restJson1InvokeEndpointCommandError = function (output, conte
|
|
|
99
99
|
case 0:
|
|
100
100
|
_a = [__assign({}, output)];
|
|
101
101
|
_c = {};
|
|
102
|
-
return [4,
|
|
102
|
+
return [4, parseErrorBody(output.body, context)];
|
|
103
103
|
case 1:
|
|
104
104
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
105
105
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -176,7 +176,7 @@ var deserializeAws_restJson1InvokeEndpointAsyncCommandError = function (output,
|
|
|
176
176
|
case 0:
|
|
177
177
|
_a = [__assign({}, output)];
|
|
178
178
|
_c = {};
|
|
179
|
-
return [4,
|
|
179
|
+
return [4, parseErrorBody(output.body, context)];
|
|
180
180
|
case 1:
|
|
181
181
|
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
182
182
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
@@ -325,6 +325,19 @@ var parseBody = function (streamBody, context) {
|
|
|
325
325
|
return {};
|
|
326
326
|
});
|
|
327
327
|
};
|
|
328
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
329
|
+
var value;
|
|
330
|
+
var _a;
|
|
331
|
+
return __generator(this, function (_b) {
|
|
332
|
+
switch (_b.label) {
|
|
333
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
334
|
+
case 1:
|
|
335
|
+
value = _b.sent();
|
|
336
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
337
|
+
return [2, value];
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
}); };
|
|
328
341
|
var loadRestJsonErrorCode = function (output, data) {
|
|
329
342
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
330
343
|
var sanitizeErrorCode = function (rawValue) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sagemaker-runtime",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sagemaker 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",
|