@aws-sdk/client-comprehendmedical 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-comprehendmedical
@@ -284,7 +284,7 @@ exports.deserializeAws_json1_1DescribeEntitiesDetectionV2JobCommand = deserializ
284
284
  const deserializeAws_json1_1DescribeEntitiesDetectionV2JobCommandError = async (output, context) => {
285
285
  const parsedOutput = {
286
286
  ...output,
287
- body: await parseBody(output.body, context),
287
+ body: await parseErrorBody(output.body, context),
288
288
  };
289
289
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
290
290
  switch (errorCode) {
@@ -327,7 +327,7 @@ exports.deserializeAws_json1_1DescribeICD10CMInferenceJobCommand = deserializeAw
327
327
  const deserializeAws_json1_1DescribeICD10CMInferenceJobCommandError = async (output, context) => {
328
328
  const parsedOutput = {
329
329
  ...output,
330
- body: await parseBody(output.body, context),
330
+ body: await parseErrorBody(output.body, context),
331
331
  };
332
332
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
333
333
  switch (errorCode) {
@@ -370,7 +370,7 @@ exports.deserializeAws_json1_1DescribePHIDetectionJobCommand = deserializeAws_js
370
370
  const deserializeAws_json1_1DescribePHIDetectionJobCommandError = async (output, context) => {
371
371
  const parsedOutput = {
372
372
  ...output,
373
- body: await parseBody(output.body, context),
373
+ body: await parseErrorBody(output.body, context),
374
374
  };
375
375
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
376
376
  switch (errorCode) {
@@ -413,7 +413,7 @@ exports.deserializeAws_json1_1DescribeRxNormInferenceJobCommand = deserializeAws
413
413
  const deserializeAws_json1_1DescribeRxNormInferenceJobCommandError = async (output, context) => {
414
414
  const parsedOutput = {
415
415
  ...output,
416
- body: await parseBody(output.body, context),
416
+ body: await parseErrorBody(output.body, context),
417
417
  };
418
418
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
419
419
  switch (errorCode) {
@@ -456,7 +456,7 @@ exports.deserializeAws_json1_1DescribeSNOMEDCTInferenceJobCommand = deserializeA
456
456
  const deserializeAws_json1_1DescribeSNOMEDCTInferenceJobCommandError = async (output, context) => {
457
457
  const parsedOutput = {
458
458
  ...output,
459
- body: await parseBody(output.body, context),
459
+ body: await parseErrorBody(output.body, context),
460
460
  };
461
461
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
462
462
  switch (errorCode) {
@@ -499,7 +499,7 @@ exports.deserializeAws_json1_1DetectEntitiesCommand = deserializeAws_json1_1Dete
499
499
  const deserializeAws_json1_1DetectEntitiesCommandError = async (output, context) => {
500
500
  const parsedOutput = {
501
501
  ...output,
502
- body: await parseBody(output.body, context),
502
+ body: await parseErrorBody(output.body, context),
503
503
  };
504
504
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
505
505
  switch (errorCode) {
@@ -548,7 +548,7 @@ exports.deserializeAws_json1_1DetectEntitiesV2Command = deserializeAws_json1_1De
548
548
  const deserializeAws_json1_1DetectEntitiesV2CommandError = async (output, context) => {
549
549
  const parsedOutput = {
550
550
  ...output,
551
- body: await parseBody(output.body, context),
551
+ body: await parseErrorBody(output.body, context),
552
552
  };
553
553
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
554
554
  switch (errorCode) {
@@ -597,7 +597,7 @@ exports.deserializeAws_json1_1DetectPHICommand = deserializeAws_json1_1DetectPHI
597
597
  const deserializeAws_json1_1DetectPHICommandError = async (output, context) => {
598
598
  const parsedOutput = {
599
599
  ...output,
600
- body: await parseBody(output.body, context),
600
+ body: await parseErrorBody(output.body, context),
601
601
  };
602
602
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
603
603
  switch (errorCode) {
@@ -646,7 +646,7 @@ exports.deserializeAws_json1_1InferICD10CMCommand = deserializeAws_json1_1InferI
646
646
  const deserializeAws_json1_1InferICD10CMCommandError = async (output, context) => {
647
647
  const parsedOutput = {
648
648
  ...output,
649
- body: await parseBody(output.body, context),
649
+ body: await parseErrorBody(output.body, context),
650
650
  };
651
651
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
652
652
  switch (errorCode) {
@@ -695,7 +695,7 @@ exports.deserializeAws_json1_1InferRxNormCommand = deserializeAws_json1_1InferRx
695
695
  const deserializeAws_json1_1InferRxNormCommandError = async (output, context) => {
696
696
  const parsedOutput = {
697
697
  ...output,
698
- body: await parseBody(output.body, context),
698
+ body: await parseErrorBody(output.body, context),
699
699
  };
700
700
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
701
701
  switch (errorCode) {
@@ -744,7 +744,7 @@ exports.deserializeAws_json1_1InferSNOMEDCTCommand = deserializeAws_json1_1Infer
744
744
  const deserializeAws_json1_1InferSNOMEDCTCommandError = async (output, context) => {
745
745
  const parsedOutput = {
746
746
  ...output,
747
- body: await parseBody(output.body, context),
747
+ body: await parseErrorBody(output.body, context),
748
748
  };
749
749
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
750
750
  switch (errorCode) {
@@ -793,7 +793,7 @@ exports.deserializeAws_json1_1ListEntitiesDetectionV2JobsCommand = deserializeAw
793
793
  const deserializeAws_json1_1ListEntitiesDetectionV2JobsCommandError = async (output, context) => {
794
794
  const parsedOutput = {
795
795
  ...output,
796
- body: await parseBody(output.body, context),
796
+ body: await parseErrorBody(output.body, context),
797
797
  };
798
798
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
799
799
  switch (errorCode) {
@@ -836,7 +836,7 @@ exports.deserializeAws_json1_1ListICD10CMInferenceJobsCommand = deserializeAws_j
836
836
  const deserializeAws_json1_1ListICD10CMInferenceJobsCommandError = async (output, context) => {
837
837
  const parsedOutput = {
838
838
  ...output,
839
- body: await parseBody(output.body, context),
839
+ body: await parseErrorBody(output.body, context),
840
840
  };
841
841
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
842
842
  switch (errorCode) {
@@ -879,7 +879,7 @@ exports.deserializeAws_json1_1ListPHIDetectionJobsCommand = deserializeAws_json1
879
879
  const deserializeAws_json1_1ListPHIDetectionJobsCommandError = async (output, context) => {
880
880
  const parsedOutput = {
881
881
  ...output,
882
- body: await parseBody(output.body, context),
882
+ body: await parseErrorBody(output.body, context),
883
883
  };
884
884
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
885
885
  switch (errorCode) {
@@ -922,7 +922,7 @@ exports.deserializeAws_json1_1ListRxNormInferenceJobsCommand = deserializeAws_js
922
922
  const deserializeAws_json1_1ListRxNormInferenceJobsCommandError = async (output, context) => {
923
923
  const parsedOutput = {
924
924
  ...output,
925
- body: await parseBody(output.body, context),
925
+ body: await parseErrorBody(output.body, context),
926
926
  };
927
927
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
928
928
  switch (errorCode) {
@@ -965,7 +965,7 @@ exports.deserializeAws_json1_1ListSNOMEDCTInferenceJobsCommand = deserializeAws_
965
965
  const deserializeAws_json1_1ListSNOMEDCTInferenceJobsCommandError = async (output, context) => {
966
966
  const parsedOutput = {
967
967
  ...output,
968
- body: await parseBody(output.body, context),
968
+ body: await parseErrorBody(output.body, context),
969
969
  };
970
970
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
971
971
  switch (errorCode) {
@@ -1008,7 +1008,7 @@ exports.deserializeAws_json1_1StartEntitiesDetectionV2JobCommand = deserializeAw
1008
1008
  const deserializeAws_json1_1StartEntitiesDetectionV2JobCommandError = async (output, context) => {
1009
1009
  const parsedOutput = {
1010
1010
  ...output,
1011
- body: await parseBody(output.body, context),
1011
+ body: await parseErrorBody(output.body, context),
1012
1012
  };
1013
1013
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1014
1014
  switch (errorCode) {
@@ -1051,7 +1051,7 @@ exports.deserializeAws_json1_1StartICD10CMInferenceJobCommand = deserializeAws_j
1051
1051
  const deserializeAws_json1_1StartICD10CMInferenceJobCommandError = async (output, context) => {
1052
1052
  const parsedOutput = {
1053
1053
  ...output,
1054
- body: await parseBody(output.body, context),
1054
+ body: await parseErrorBody(output.body, context),
1055
1055
  };
1056
1056
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1057
1057
  switch (errorCode) {
@@ -1094,7 +1094,7 @@ exports.deserializeAws_json1_1StartPHIDetectionJobCommand = deserializeAws_json1
1094
1094
  const deserializeAws_json1_1StartPHIDetectionJobCommandError = async (output, context) => {
1095
1095
  const parsedOutput = {
1096
1096
  ...output,
1097
- body: await parseBody(output.body, context),
1097
+ body: await parseErrorBody(output.body, context),
1098
1098
  };
1099
1099
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1100
1100
  switch (errorCode) {
@@ -1137,7 +1137,7 @@ exports.deserializeAws_json1_1StartRxNormInferenceJobCommand = deserializeAws_js
1137
1137
  const deserializeAws_json1_1StartRxNormInferenceJobCommandError = async (output, context) => {
1138
1138
  const parsedOutput = {
1139
1139
  ...output,
1140
- body: await parseBody(output.body, context),
1140
+ body: await parseErrorBody(output.body, context),
1141
1141
  };
1142
1142
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1143
1143
  switch (errorCode) {
@@ -1180,7 +1180,7 @@ exports.deserializeAws_json1_1StartSNOMEDCTInferenceJobCommand = deserializeAws_
1180
1180
  const deserializeAws_json1_1StartSNOMEDCTInferenceJobCommandError = async (output, context) => {
1181
1181
  const parsedOutput = {
1182
1182
  ...output,
1183
- body: await parseBody(output.body, context),
1183
+ body: await parseErrorBody(output.body, context),
1184
1184
  };
1185
1185
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1186
1186
  switch (errorCode) {
@@ -1223,7 +1223,7 @@ exports.deserializeAws_json1_1StopEntitiesDetectionV2JobCommand = deserializeAws
1223
1223
  const deserializeAws_json1_1StopEntitiesDetectionV2JobCommandError = async (output, context) => {
1224
1224
  const parsedOutput = {
1225
1225
  ...output,
1226
- body: await parseBody(output.body, context),
1226
+ body: await parseErrorBody(output.body, context),
1227
1227
  };
1228
1228
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1229
1229
  switch (errorCode) {
@@ -1263,7 +1263,7 @@ exports.deserializeAws_json1_1StopICD10CMInferenceJobCommand = deserializeAws_js
1263
1263
  const deserializeAws_json1_1StopICD10CMInferenceJobCommandError = async (output, context) => {
1264
1264
  const parsedOutput = {
1265
1265
  ...output,
1266
- body: await parseBody(output.body, context),
1266
+ body: await parseErrorBody(output.body, context),
1267
1267
  };
1268
1268
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1269
1269
  switch (errorCode) {
@@ -1303,7 +1303,7 @@ exports.deserializeAws_json1_1StopPHIDetectionJobCommand = deserializeAws_json1_
1303
1303
  const deserializeAws_json1_1StopPHIDetectionJobCommandError = async (output, context) => {
1304
1304
  const parsedOutput = {
1305
1305
  ...output,
1306
- body: await parseBody(output.body, context),
1306
+ body: await parseErrorBody(output.body, context),
1307
1307
  };
1308
1308
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1309
1309
  switch (errorCode) {
@@ -1343,7 +1343,7 @@ exports.deserializeAws_json1_1StopRxNormInferenceJobCommand = deserializeAws_jso
1343
1343
  const deserializeAws_json1_1StopRxNormInferenceJobCommandError = async (output, context) => {
1344
1344
  const parsedOutput = {
1345
1345
  ...output,
1346
- body: await parseBody(output.body, context),
1346
+ body: await parseErrorBody(output.body, context),
1347
1347
  };
1348
1348
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1349
1349
  switch (errorCode) {
@@ -1383,7 +1383,7 @@ exports.deserializeAws_json1_1StopSNOMEDCTInferenceJobCommand = deserializeAws_j
1383
1383
  const deserializeAws_json1_1StopSNOMEDCTInferenceJobCommandError = async (output, context) => {
1384
1384
  const parsedOutput = {
1385
1385
  ...output,
1386
- body: await parseBody(output.body, context),
1386
+ body: await parseErrorBody(output.body, context),
1387
1387
  };
1388
1388
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1389
1389
  switch (errorCode) {
@@ -2357,6 +2357,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
2357
2357
  }
2358
2358
  return {};
2359
2359
  });
2360
+ const parseErrorBody = async (errorBody, context) => {
2361
+ var _a;
2362
+ const value = await parseBody(errorBody, context);
2363
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2364
+ return value;
2365
+ };
2360
2366
  const loadRestJsonErrorCode = (output, data) => {
2361
2367
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2362
2368
  const sanitizeErrorCode = (rawValue) => {
@@ -316,7 +316,7 @@ var deserializeAws_json1_1DescribeEntitiesDetectionV2JobCommandError = function
316
316
  case 0:
317
317
  _a = [__assign({}, output)];
318
318
  _c = {};
319
- return [4, parseBody(output.body, context)];
319
+ return [4, parseErrorBody(output.body, context)];
320
320
  case 1:
321
321
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
322
322
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -379,7 +379,7 @@ var deserializeAws_json1_1DescribeICD10CMInferenceJobCommandError = function (ou
379
379
  case 0:
380
380
  _a = [__assign({}, output)];
381
381
  _c = {};
382
- return [4, parseBody(output.body, context)];
382
+ return [4, parseErrorBody(output.body, context)];
383
383
  case 1:
384
384
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
385
385
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -442,7 +442,7 @@ var deserializeAws_json1_1DescribePHIDetectionJobCommandError = function (output
442
442
  case 0:
443
443
  _a = [__assign({}, output)];
444
444
  _c = {};
445
- return [4, parseBody(output.body, context)];
445
+ return [4, parseErrorBody(output.body, context)];
446
446
  case 1:
447
447
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
448
448
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -505,7 +505,7 @@ var deserializeAws_json1_1DescribeRxNormInferenceJobCommandError = function (out
505
505
  case 0:
506
506
  _a = [__assign({}, output)];
507
507
  _c = {};
508
- return [4, parseBody(output.body, context)];
508
+ return [4, parseErrorBody(output.body, context)];
509
509
  case 1:
510
510
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
511
511
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -568,7 +568,7 @@ var deserializeAws_json1_1DescribeSNOMEDCTInferenceJobCommandError = function (o
568
568
  case 0:
569
569
  _a = [__assign({}, output)];
570
570
  _c = {};
571
- return [4, parseBody(output.body, context)];
571
+ return [4, parseErrorBody(output.body, context)];
572
572
  case 1:
573
573
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
574
574
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -631,7 +631,7 @@ var deserializeAws_json1_1DetectEntitiesCommandError = function (output, context
631
631
  case 0:
632
632
  _a = [__assign({}, output)];
633
633
  _c = {};
634
- return [4, parseBody(output.body, context)];
634
+ return [4, parseErrorBody(output.body, context)];
635
635
  case 1:
636
636
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
637
637
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -702,7 +702,7 @@ var deserializeAws_json1_1DetectEntitiesV2CommandError = function (output, conte
702
702
  case 0:
703
703
  _a = [__assign({}, output)];
704
704
  _c = {};
705
- return [4, parseBody(output.body, context)];
705
+ return [4, parseErrorBody(output.body, context)];
706
706
  case 1:
707
707
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
708
708
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -773,7 +773,7 @@ var deserializeAws_json1_1DetectPHICommandError = function (output, context) { r
773
773
  case 0:
774
774
  _a = [__assign({}, output)];
775
775
  _c = {};
776
- return [4, parseBody(output.body, context)];
776
+ return [4, parseErrorBody(output.body, context)];
777
777
  case 1:
778
778
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
779
779
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -844,7 +844,7 @@ var deserializeAws_json1_1InferICD10CMCommandError = function (output, context)
844
844
  case 0:
845
845
  _a = [__assign({}, output)];
846
846
  _c = {};
847
- return [4, parseBody(output.body, context)];
847
+ return [4, parseErrorBody(output.body, context)];
848
848
  case 1:
849
849
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
850
850
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -915,7 +915,7 @@ var deserializeAws_json1_1InferRxNormCommandError = function (output, context) {
915
915
  case 0:
916
916
  _a = [__assign({}, output)];
917
917
  _c = {};
918
- return [4, parseBody(output.body, context)];
918
+ return [4, parseErrorBody(output.body, context)];
919
919
  case 1:
920
920
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
921
921
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -986,7 +986,7 @@ var deserializeAws_json1_1InferSNOMEDCTCommandError = function (output, context)
986
986
  case 0:
987
987
  _a = [__assign({}, output)];
988
988
  _c = {};
989
- return [4, parseBody(output.body, context)];
989
+ return [4, parseErrorBody(output.body, context)];
990
990
  case 1:
991
991
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
992
992
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1057,7 +1057,7 @@ var deserializeAws_json1_1ListEntitiesDetectionV2JobsCommandError = function (ou
1057
1057
  case 0:
1058
1058
  _a = [__assign({}, output)];
1059
1059
  _c = {};
1060
- return [4, parseBody(output.body, context)];
1060
+ return [4, parseErrorBody(output.body, context)];
1061
1061
  case 1:
1062
1062
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1063
1063
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1120,7 +1120,7 @@ var deserializeAws_json1_1ListICD10CMInferenceJobsCommandError = function (outpu
1120
1120
  case 0:
1121
1121
  _a = [__assign({}, output)];
1122
1122
  _c = {};
1123
- return [4, parseBody(output.body, context)];
1123
+ return [4, parseErrorBody(output.body, context)];
1124
1124
  case 1:
1125
1125
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1126
1126
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1183,7 +1183,7 @@ var deserializeAws_json1_1ListPHIDetectionJobsCommandError = function (output, c
1183
1183
  case 0:
1184
1184
  _a = [__assign({}, output)];
1185
1185
  _c = {};
1186
- return [4, parseBody(output.body, context)];
1186
+ return [4, parseErrorBody(output.body, context)];
1187
1187
  case 1:
1188
1188
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1189
1189
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1246,7 +1246,7 @@ var deserializeAws_json1_1ListRxNormInferenceJobsCommandError = function (output
1246
1246
  case 0:
1247
1247
  _a = [__assign({}, output)];
1248
1248
  _c = {};
1249
- return [4, parseBody(output.body, context)];
1249
+ return [4, parseErrorBody(output.body, context)];
1250
1250
  case 1:
1251
1251
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1252
1252
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1309,7 +1309,7 @@ var deserializeAws_json1_1ListSNOMEDCTInferenceJobsCommandError = function (outp
1309
1309
  case 0:
1310
1310
  _a = [__assign({}, output)];
1311
1311
  _c = {};
1312
- return [4, parseBody(output.body, context)];
1312
+ return [4, parseErrorBody(output.body, context)];
1313
1313
  case 1:
1314
1314
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1315
1315
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1372,7 +1372,7 @@ var deserializeAws_json1_1StartEntitiesDetectionV2JobCommandError = function (ou
1372
1372
  case 0:
1373
1373
  _a = [__assign({}, output)];
1374
1374
  _c = {};
1375
- return [4, parseBody(output.body, context)];
1375
+ return [4, parseErrorBody(output.body, context)];
1376
1376
  case 1:
1377
1377
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1378
1378
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1435,7 +1435,7 @@ var deserializeAws_json1_1StartICD10CMInferenceJobCommandError = function (outpu
1435
1435
  case 0:
1436
1436
  _a = [__assign({}, output)];
1437
1437
  _c = {};
1438
- return [4, parseBody(output.body, context)];
1438
+ return [4, parseErrorBody(output.body, context)];
1439
1439
  case 1:
1440
1440
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1441
1441
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1498,7 +1498,7 @@ var deserializeAws_json1_1StartPHIDetectionJobCommandError = function (output, c
1498
1498
  case 0:
1499
1499
  _a = [__assign({}, output)];
1500
1500
  _c = {};
1501
- return [4, parseBody(output.body, context)];
1501
+ return [4, parseErrorBody(output.body, context)];
1502
1502
  case 1:
1503
1503
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1504
1504
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1561,7 +1561,7 @@ var deserializeAws_json1_1StartRxNormInferenceJobCommandError = function (output
1561
1561
  case 0:
1562
1562
  _a = [__assign({}, output)];
1563
1563
  _c = {};
1564
- return [4, parseBody(output.body, context)];
1564
+ return [4, parseErrorBody(output.body, context)];
1565
1565
  case 1:
1566
1566
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1567
1567
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1624,7 +1624,7 @@ var deserializeAws_json1_1StartSNOMEDCTInferenceJobCommandError = function (outp
1624
1624
  case 0:
1625
1625
  _a = [__assign({}, output)];
1626
1626
  _c = {};
1627
- return [4, parseBody(output.body, context)];
1627
+ return [4, parseErrorBody(output.body, context)];
1628
1628
  case 1:
1629
1629
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1630
1630
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1687,7 +1687,7 @@ var deserializeAws_json1_1StopEntitiesDetectionV2JobCommandError = function (out
1687
1687
  case 0:
1688
1688
  _a = [__assign({}, output)];
1689
1689
  _c = {};
1690
- return [4, parseBody(output.body, context)];
1690
+ return [4, parseErrorBody(output.body, context)];
1691
1691
  case 1:
1692
1692
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1693
1693
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1746,7 +1746,7 @@ var deserializeAws_json1_1StopICD10CMInferenceJobCommandError = function (output
1746
1746
  case 0:
1747
1747
  _a = [__assign({}, output)];
1748
1748
  _c = {};
1749
- return [4, parseBody(output.body, context)];
1749
+ return [4, parseErrorBody(output.body, context)];
1750
1750
  case 1:
1751
1751
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1752
1752
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1805,7 +1805,7 @@ var deserializeAws_json1_1StopPHIDetectionJobCommandError = function (output, co
1805
1805
  case 0:
1806
1806
  _a = [__assign({}, output)];
1807
1807
  _c = {};
1808
- return [4, parseBody(output.body, context)];
1808
+ return [4, parseErrorBody(output.body, context)];
1809
1809
  case 1:
1810
1810
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1811
1811
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1864,7 +1864,7 @@ var deserializeAws_json1_1StopRxNormInferenceJobCommandError = function (output,
1864
1864
  case 0:
1865
1865
  _a = [__assign({}, output)];
1866
1866
  _c = {};
1867
- return [4, parseBody(output.body, context)];
1867
+ return [4, parseErrorBody(output.body, context)];
1868
1868
  case 1:
1869
1869
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1870
1870
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1923,7 +1923,7 @@ var deserializeAws_json1_1StopSNOMEDCTInferenceJobCommandError = function (outpu
1923
1923
  case 0:
1924
1924
  _a = [__assign({}, output)];
1925
1925
  _c = {};
1926
- return [4, parseBody(output.body, context)];
1926
+ return [4, parseErrorBody(output.body, context)];
1927
1927
  case 1:
1928
1928
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1929
1929
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2817,6 +2817,19 @@ var parseBody = function (streamBody, context) {
2817
2817
  return {};
2818
2818
  });
2819
2819
  };
2820
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
2821
+ var value;
2822
+ var _a;
2823
+ return __generator(this, function (_b) {
2824
+ switch (_b.label) {
2825
+ case 0: return [4, parseBody(errorBody, context)];
2826
+ case 1:
2827
+ value = _b.sent();
2828
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2829
+ return [2, value];
2830
+ }
2831
+ });
2832
+ }); };
2820
2833
  var loadRestJsonErrorCode = function (output, data) {
2821
2834
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2822
2835
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-comprehendmedical",
3
3
  "description": "AWS SDK for JavaScript Comprehendmedical 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",