@aws-sdk/core 3.810.0 → 3.816.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.
@@ -26,6 +26,7 @@ __export(index_exports, {
26
26
  AwsSdkSigV4Signer: () => AwsSdkSigV4Signer,
27
27
  NODE_AUTH_SCHEME_PREFERENCE_OPTIONS: () => NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,
28
28
  NODE_SIGV4A_CONFIG_OPTIONS: () => NODE_SIGV4A_CONFIG_OPTIONS,
29
+ getBearerTokenEnvKey: () => getBearerTokenEnvKey,
29
30
  resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config,
30
31
  resolveAwsSdkSigV4AConfig: () => resolveAwsSdkSigV4AConfig,
31
32
  resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config,
@@ -382,6 +383,7 @@ __name(bindCallerConfig, "bindCallerConfig");
382
383
  AwsSdkSigV4Signer,
383
384
  NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,
384
385
  NODE_SIGV4A_CONFIG_OPTIONS,
386
+ getBearerTokenEnvKey,
385
387
  resolveAWSSDKSigV4Config,
386
388
  resolveAwsSdkSigV4AConfig,
387
389
  resolveAwsSdkSigV4Config,
@@ -148,11 +148,14 @@ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
148
148
  if (headerKey !== void 0) {
149
149
  return sanitizeErrorCode(output.headers[headerKey]);
150
150
  }
151
- if (data.code !== void 0) {
152
- return sanitizeErrorCode(data.code);
153
- }
154
- if (data["__type"] !== void 0) {
155
- return sanitizeErrorCode(data["__type"]);
151
+ if (data && typeof data === "object") {
152
+ const codeKey = findKey(data, "code");
153
+ if (codeKey && data[codeKey] !== void 0) {
154
+ return sanitizeErrorCode(data[codeKey]);
155
+ }
156
+ if (data["__type"] !== void 0) {
157
+ return sanitizeErrorCode(data["__type"]);
158
+ }
156
159
  }
157
160
  }, "loadRestJsonErrorCode");
158
161
 
@@ -1 +1,2 @@
1
1
  export * from "./aws_sdk";
2
+ export * from "./utils/getBearerTokenEnvKey";
@@ -42,10 +42,13 @@ export const loadRestJsonErrorCode = (output, data) => {
42
42
  if (headerKey !== undefined) {
43
43
  return sanitizeErrorCode(output.headers[headerKey]);
44
44
  }
45
- if (data.code !== undefined) {
46
- return sanitizeErrorCode(data.code);
47
- }
48
- if (data["__type"] !== undefined) {
49
- return sanitizeErrorCode(data["__type"]);
45
+ if (data && typeof data === "object") {
46
+ const codeKey = findKey(data, "code");
47
+ if (codeKey && data[codeKey] !== undefined) {
48
+ return sanitizeErrorCode(data[codeKey]);
49
+ }
50
+ if (data["__type"] !== undefined) {
51
+ return sanitizeErrorCode(data["__type"]);
52
+ }
50
53
  }
51
54
  };
@@ -1 +1,2 @@
1
1
  export * from "./aws_sdk";
2
+ export * from "./utils/getBearerTokenEnvKey";
@@ -1 +1,2 @@
1
1
  export * from "./aws_sdk";
2
+ export * from "./utils/getBearerTokenEnvKey";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/core",
3
- "version": "3.810.0",
3
+ "version": "3.816.0",
4
4
  "description": "Core functions & classes shared by multiple AWS SDK clients.",
5
5
  "scripts": {
6
6
  "build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",