@aws-sdk/client-sagemaker 3.525.0 → 3.529.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.
@@ -1,4 +1,4 @@
1
- import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
1
+ import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
2
2
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
3
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
@@ -15744,43 +15744,3 @@ function sharedHeaders(operation) {
15744
15744
  "x-amz-target": `SageMaker.${operation}`,
15745
15745
  };
15746
15746
  }
15747
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
15748
- if (encoded.length) {
15749
- return JSON.parse(encoded);
15750
- }
15751
- return {};
15752
- });
15753
- const parseErrorBody = async (errorBody, context) => {
15754
- const value = await parseBody(errorBody, context);
15755
- value.message = value.message ?? value.Message;
15756
- return value;
15757
- };
15758
- const loadRestJsonErrorCode = (output, data) => {
15759
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
15760
- const sanitizeErrorCode = (rawValue) => {
15761
- let cleanValue = rawValue;
15762
- if (typeof cleanValue === "number") {
15763
- cleanValue = cleanValue.toString();
15764
- }
15765
- if (cleanValue.indexOf(",") >= 0) {
15766
- cleanValue = cleanValue.split(",")[0];
15767
- }
15768
- if (cleanValue.indexOf(":") >= 0) {
15769
- cleanValue = cleanValue.split(":")[0];
15770
- }
15771
- if (cleanValue.indexOf("#") >= 0) {
15772
- cleanValue = cleanValue.split("#")[1];
15773
- }
15774
- return cleanValue;
15775
- };
15776
- const headerKey = findKey(output.headers, "x-amzn-errortype");
15777
- if (headerKey !== undefined) {
15778
- return sanitizeErrorCode(output.headers[headerKey]);
15779
- }
15780
- if (data.code !== undefined) {
15781
- return sanitizeErrorCode(data.code);
15782
- }
15783
- if (data["__type"] !== undefined) {
15784
- return sanitizeErrorCode(data["__type"]);
15785
- }
15786
- };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-sagemaker",
3
3
  "description": "AWS SDK for JavaScript Sagemaker Client for Node.js, Browser and React Native",
4
- "version": "3.525.0",
4
+ "version": "3.529.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-sagemaker",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.525.0",
24
- "@aws-sdk/core": "3.525.0",
25
- "@aws-sdk/credential-provider-node": "3.525.0",
23
+ "@aws-sdk/client-sts": "3.529.0",
24
+ "@aws-sdk/core": "3.529.0",
25
+ "@aws-sdk/credential-provider-node": "3.529.0",
26
26
  "@aws-sdk/middleware-host-header": "3.523.0",
27
27
  "@aws-sdk/middleware-logger": "3.523.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.523.0",