@aws-sdk/client-kinesis-video-signaling 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-kinesis-video-signaling
@@ -69,7 +69,7 @@ exports.deserializeAws_restJson1GetIceServerConfigCommand = deserializeAws_restJ
69
69
  const deserializeAws_restJson1GetIceServerConfigCommandError = async (output, context) => {
70
70
  const parsedOutput = {
71
71
  ...output,
72
- body: await parseBody(output.body, context),
72
+ body: await parseErrorBody(output.body, context),
73
73
  };
74
74
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
75
75
  switch (errorCode) {
@@ -118,7 +118,7 @@ exports.deserializeAws_restJson1SendAlexaOfferToMasterCommand = deserializeAws_r
118
118
  const deserializeAws_restJson1SendAlexaOfferToMasterCommandError = async (output, context) => {
119
119
  const parsedOutput = {
120
120
  ...output,
121
- body: await parseBody(output.body, context),
121
+ body: await parseErrorBody(output.body, context),
122
122
  };
123
123
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
124
124
  switch (errorCode) {
@@ -274,6 +274,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
274
274
  }
275
275
  return {};
276
276
  });
277
+ const parseErrorBody = async (errorBody, context) => {
278
+ var _a;
279
+ const value = await parseBody(errorBody, context);
280
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
281
+ return value;
282
+ };
277
283
  const loadRestJsonErrorCode = (output, data) => {
278
284
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
279
285
  const sanitizeErrorCode = (rawValue) => {
@@ -82,7 +82,7 @@ var deserializeAws_restJson1GetIceServerConfigCommandError = function (output, c
82
82
  case 0:
83
83
  _a = [__assign({}, output)];
84
84
  _c = {};
85
- return [4, parseBody(output.body, context)];
85
+ return [4, parseErrorBody(output.body, context)];
86
86
  case 1:
87
87
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
88
88
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -158,7 +158,7 @@ var deserializeAws_restJson1SendAlexaOfferToMasterCommandError = function (outpu
158
158
  case 0:
159
159
  _a = [__assign({}, output)];
160
160
  _c = {};
161
- return [4, parseBody(output.body, context)];
161
+ return [4, parseErrorBody(output.body, context)];
162
162
  case 1:
163
163
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
164
164
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -332,6 +332,19 @@ var parseBody = function (streamBody, context) {
332
332
  return {};
333
333
  });
334
334
  };
335
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
336
+ var value;
337
+ var _a;
338
+ return __generator(this, function (_b) {
339
+ switch (_b.label) {
340
+ case 0: return [4, parseBody(errorBody, context)];
341
+ case 1:
342
+ value = _b.sent();
343
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
344
+ return [2, value];
345
+ }
346
+ });
347
+ }); };
335
348
  var loadRestJsonErrorCode = function (output, data) {
336
349
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
337
350
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-kinesis-video-signaling",
3
3
  "description": "AWS SDK for JavaScript Kinesis Video Signaling Client for Node.js, Browser and React Native",
4
- "version": "3.180.0",
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.180.0",
22
+ "@aws-sdk/client-sts": "3.181.0",
23
23
  "@aws-sdk/config-resolver": "3.178.0",
24
- "@aws-sdk/credential-provider-node": "3.180.0",
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",