@aws-sdk/core 3.973.11 → 3.973.12

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/dist-cjs/index.js CHANGED
@@ -418,9 +418,9 @@ class ProtocolLib {
418
418
  }
419
419
  error.Error = {
420
420
  ...error.Error,
421
- Type: error.Error.Type,
422
- Code: error.Error.Code,
423
- Message: error.Error.message ?? error.Error.Message ?? msg,
421
+ Type: error.Error?.Type,
422
+ Code: error.Error?.Code,
423
+ Message: error.Error?.message ?? error.Error?.Message ?? msg,
424
424
  };
425
425
  const reqId = error.$metadata.requestId;
426
426
  if (reqId) {
@@ -1669,7 +1669,7 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
1669
1669
  }
1670
1670
  async handleError(operationSchema, context, response, dataObject, metadata) {
1671
1671
  const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
1672
- const errorData = this.loadQueryError(dataObject);
1672
+ const errorData = this.loadQueryError(dataObject) ?? {};
1673
1673
  const message = this.loadQueryErrorMessage(dataObject);
1674
1674
  errorData.message = message;
1675
1675
  errorData.Error = {
@@ -80,9 +80,9 @@ class ProtocolLib {
80
80
  }
81
81
  error.Error = {
82
82
  ...error.Error,
83
- Type: error.Error.Type,
84
- Code: error.Error.Code,
85
- Message: error.Error.message ?? error.Error.Message ?? msg,
83
+ Type: error.Error?.Type,
84
+ Code: error.Error?.Code,
85
+ Message: error.Error?.message ?? error.Error?.Message ?? msg,
86
86
  };
87
87
  const reqId = error.$metadata.requestId;
88
88
  if (reqId) {
@@ -1331,7 +1331,7 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
1331
1331
  }
1332
1332
  async handleError(operationSchema, context, response, dataObject, metadata) {
1333
1333
  const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
1334
- const errorData = this.loadQueryError(dataObject);
1334
+ const errorData = this.loadQueryError(dataObject) ?? {};
1335
1335
  const message = this.loadQueryErrorMessage(dataObject);
1336
1336
  errorData.message = message;
1337
1337
  errorData.Error = {
@@ -71,9 +71,9 @@ export class ProtocolLib {
71
71
  }
72
72
  error.Error = {
73
73
  ...error.Error,
74
- Type: error.Error.Type,
75
- Code: error.Error.Code,
76
- Message: error.Error.message ?? error.Error.Message ?? msg,
74
+ Type: error.Error?.Type,
75
+ Code: error.Error?.Code,
76
+ Message: error.Error?.message ?? error.Error?.Message ?? msg,
77
77
  };
78
78
  const reqId = error.$metadata.requestId;
79
79
  if (reqId) {
@@ -87,7 +87,7 @@ export class AwsQueryProtocol extends RpcProtocol {
87
87
  }
88
88
  async handleError(operationSchema, context, response, dataObject, metadata) {
89
89
  const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
90
- const errorData = this.loadQueryError(dataObject);
90
+ const errorData = this.loadQueryError(dataObject) ?? {};
91
91
  const message = this.loadQueryErrorMessage(dataObject);
92
92
  errorData.message = message;
93
93
  errorData.Error = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/core",
3
- "version": "3.973.11",
3
+ "version": "3.973.12",
4
4
  "description": "Core functions & classes shared by multiple AWS SDK clients.",
5
5
  "scripts": {
6
6
  "build": "yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",