@aws-sdk/client-transcribe-streaming 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-transcribe-streaming
@@ -146,7 +146,7 @@ exports.deserializeAws_restJson1StartMedicalStreamTranscriptionCommand = deseria
146
146
  const deserializeAws_restJson1StartMedicalStreamTranscriptionCommandError = async (output, context) => {
147
147
  const parsedOutput = {
148
148
  ...output,
149
- body: await parseBody(output.body, context),
149
+ body: await parseErrorBody(output.body, context),
150
150
  };
151
151
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
152
152
  switch (errorCode) {
@@ -230,7 +230,7 @@ exports.deserializeAws_restJson1StartStreamTranscriptionCommand = deserializeAws
230
230
  const deserializeAws_restJson1StartStreamTranscriptionCommandError = async (output, context) => {
231
231
  const parsedOutput = {
232
232
  ...output,
233
- body: await parseBody(output.body, context),
233
+ body: await parseErrorBody(output.body, context),
234
234
  };
235
235
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
236
236
  switch (errorCode) {
@@ -689,6 +689,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
689
689
  }
690
690
  return {};
691
691
  });
692
+ const parseErrorBody = async (errorBody, context) => {
693
+ var _a;
694
+ const value = await parseBody(errorBody, context);
695
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
696
+ return value;
697
+ };
692
698
  const loadRestJsonErrorCode = (output, data) => {
693
699
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
694
700
  const sanitizeErrorCode = (rawValue) => {
@@ -161,7 +161,7 @@ var deserializeAws_restJson1StartMedicalStreamTranscriptionCommandError = functi
161
161
  case 0:
162
162
  _a = [__assign({}, output)];
163
163
  _c = {};
164
- return [4, parseBody(output.body, context)];
164
+ return [4, parseErrorBody(output.body, context)];
165
165
  case 1:
166
166
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
167
167
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -264,7 +264,7 @@ var deserializeAws_restJson1StartStreamTranscriptionCommandError = function (out
264
264
  case 0:
265
265
  _a = [__assign({}, output)];
266
266
  _c = {};
267
- return [4, parseBody(output.body, context)];
267
+ return [4, parseErrorBody(output.body, context)];
268
268
  case 1:
269
269
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
270
270
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -822,6 +822,19 @@ var parseBody = function (streamBody, context) {
822
822
  return {};
823
823
  });
824
824
  };
825
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
826
+ var value;
827
+ var _a;
828
+ return __generator(this, function (_b) {
829
+ switch (_b.label) {
830
+ case 0: return [4, parseBody(errorBody, context)];
831
+ case 1:
832
+ value = _b.sent();
833
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
834
+ return [2, value];
835
+ }
836
+ });
837
+ }); };
825
838
  var loadRestJsonErrorCode = function (output, data) {
826
839
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
827
840
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-transcribe-streaming",
3
3
  "description": "AWS SDK for JavaScript Transcribe Streaming 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",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "2.0.0",
22
22
  "@aws-crypto/sha256-js": "2.0.0",
23
- "@aws-sdk/client-sts": "3.180.0",
23
+ "@aws-sdk/client-sts": "3.181.0",
24
24
  "@aws-sdk/config-resolver": "3.178.0",
25
- "@aws-sdk/credential-provider-node": "3.180.0",
25
+ "@aws-sdk/credential-provider-node": "3.181.0",
26
26
  "@aws-sdk/eventstream-handler-node": "3.178.0",
27
27
  "@aws-sdk/eventstream-serde-browser": "3.178.0",
28
28
  "@aws-sdk/eventstream-serde-config-resolver": "3.178.0",