@aws-sdk/client-snowball 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-snowball
@@ -272,7 +272,7 @@ exports.deserializeAws_json1_1CancelClusterCommand = deserializeAws_json1_1Cance
272
272
  const deserializeAws_json1_1CancelClusterCommandError = async (output, context) => {
273
273
  const parsedOutput = {
274
274
  ...output,
275
- body: await parseBody(output.body, context),
275
+ body: await parseErrorBody(output.body, context),
276
276
  };
277
277
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
278
278
  switch (errorCode) {
@@ -312,7 +312,7 @@ exports.deserializeAws_json1_1CancelJobCommand = deserializeAws_json1_1CancelJob
312
312
  const deserializeAws_json1_1CancelJobCommandError = async (output, context) => {
313
313
  const parsedOutput = {
314
314
  ...output,
315
- body: await parseBody(output.body, context),
315
+ body: await parseErrorBody(output.body, context),
316
316
  };
317
317
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
318
318
  switch (errorCode) {
@@ -352,7 +352,7 @@ exports.deserializeAws_json1_1CreateAddressCommand = deserializeAws_json1_1Creat
352
352
  const deserializeAws_json1_1CreateAddressCommandError = async (output, context) => {
353
353
  const parsedOutput = {
354
354
  ...output,
355
- body: await parseBody(output.body, context),
355
+ body: await parseErrorBody(output.body, context),
356
356
  };
357
357
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
358
358
  switch (errorCode) {
@@ -389,7 +389,7 @@ exports.deserializeAws_json1_1CreateClusterCommand = deserializeAws_json1_1Creat
389
389
  const deserializeAws_json1_1CreateClusterCommandError = async (output, context) => {
390
390
  const parsedOutput = {
391
391
  ...output,
392
- body: await parseBody(output.body, context),
392
+ body: await parseErrorBody(output.body, context),
393
393
  };
394
394
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
395
395
  switch (errorCode) {
@@ -432,7 +432,7 @@ exports.deserializeAws_json1_1CreateJobCommand = deserializeAws_json1_1CreateJob
432
432
  const deserializeAws_json1_1CreateJobCommandError = async (output, context) => {
433
433
  const parsedOutput = {
434
434
  ...output,
435
- body: await parseBody(output.body, context),
435
+ body: await parseErrorBody(output.body, context),
436
436
  };
437
437
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
438
438
  switch (errorCode) {
@@ -478,7 +478,7 @@ exports.deserializeAws_json1_1CreateLongTermPricingCommand = deserializeAws_json
478
478
  const deserializeAws_json1_1CreateLongTermPricingCommandError = async (output, context) => {
479
479
  const parsedOutput = {
480
480
  ...output,
481
- body: await parseBody(output.body, context),
481
+ body: await parseErrorBody(output.body, context),
482
482
  };
483
483
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
484
484
  switch (errorCode) {
@@ -512,7 +512,7 @@ exports.deserializeAws_json1_1CreateReturnShippingLabelCommand = deserializeAws_
512
512
  const deserializeAws_json1_1CreateReturnShippingLabelCommandError = async (output, context) => {
513
513
  const parsedOutput = {
514
514
  ...output,
515
- body: await parseBody(output.body, context),
515
+ body: await parseErrorBody(output.body, context),
516
516
  };
517
517
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
518
518
  switch (errorCode) {
@@ -558,7 +558,7 @@ exports.deserializeAws_json1_1DescribeAddressCommand = deserializeAws_json1_1Des
558
558
  const deserializeAws_json1_1DescribeAddressCommandError = async (output, context) => {
559
559
  const parsedOutput = {
560
560
  ...output,
561
- body: await parseBody(output.body, context),
561
+ body: await parseErrorBody(output.body, context),
562
562
  };
563
563
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
564
564
  switch (errorCode) {
@@ -592,7 +592,7 @@ exports.deserializeAws_json1_1DescribeAddressesCommand = deserializeAws_json1_1D
592
592
  const deserializeAws_json1_1DescribeAddressesCommandError = async (output, context) => {
593
593
  const parsedOutput = {
594
594
  ...output,
595
- body: await parseBody(output.body, context),
595
+ body: await parseErrorBody(output.body, context),
596
596
  };
597
597
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
598
598
  switch (errorCode) {
@@ -629,7 +629,7 @@ exports.deserializeAws_json1_1DescribeClusterCommand = deserializeAws_json1_1Des
629
629
  const deserializeAws_json1_1DescribeClusterCommandError = async (output, context) => {
630
630
  const parsedOutput = {
631
631
  ...output,
632
- body: await parseBody(output.body, context),
632
+ body: await parseErrorBody(output.body, context),
633
633
  };
634
634
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
635
635
  switch (errorCode) {
@@ -663,7 +663,7 @@ exports.deserializeAws_json1_1DescribeJobCommand = deserializeAws_json1_1Describ
663
663
  const deserializeAws_json1_1DescribeJobCommandError = async (output, context) => {
664
664
  const parsedOutput = {
665
665
  ...output,
666
- body: await parseBody(output.body, context),
666
+ body: await parseErrorBody(output.body, context),
667
667
  };
668
668
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
669
669
  switch (errorCode) {
@@ -697,7 +697,7 @@ exports.deserializeAws_json1_1DescribeReturnShippingLabelCommand = deserializeAw
697
697
  const deserializeAws_json1_1DescribeReturnShippingLabelCommandError = async (output, context) => {
698
698
  const parsedOutput = {
699
699
  ...output,
700
- body: await parseBody(output.body, context),
700
+ body: await parseErrorBody(output.body, context),
701
701
  };
702
702
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
703
703
  switch (errorCode) {
@@ -737,7 +737,7 @@ exports.deserializeAws_json1_1GetJobManifestCommand = deserializeAws_json1_1GetJ
737
737
  const deserializeAws_json1_1GetJobManifestCommandError = async (output, context) => {
738
738
  const parsedOutput = {
739
739
  ...output,
740
- body: await parseBody(output.body, context),
740
+ body: await parseErrorBody(output.body, context),
741
741
  };
742
742
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
743
743
  switch (errorCode) {
@@ -774,7 +774,7 @@ exports.deserializeAws_json1_1GetJobUnlockCodeCommand = deserializeAws_json1_1Ge
774
774
  const deserializeAws_json1_1GetJobUnlockCodeCommandError = async (output, context) => {
775
775
  const parsedOutput = {
776
776
  ...output,
777
- body: await parseBody(output.body, context),
777
+ body: await parseErrorBody(output.body, context),
778
778
  };
779
779
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
780
780
  switch (errorCode) {
@@ -811,7 +811,7 @@ exports.deserializeAws_json1_1GetSnowballUsageCommand = deserializeAws_json1_1Ge
811
811
  const deserializeAws_json1_1GetSnowballUsageCommandError = async (output, context) => {
812
812
  const parsedOutput = {
813
813
  ...output,
814
- body: await parseBody(output.body, context),
814
+ body: await parseErrorBody(output.body, context),
815
815
  };
816
816
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
817
817
  const parsedBody = parsedOutput.body;
@@ -839,7 +839,7 @@ exports.deserializeAws_json1_1GetSoftwareUpdatesCommand = deserializeAws_json1_1
839
839
  const deserializeAws_json1_1GetSoftwareUpdatesCommandError = async (output, context) => {
840
840
  const parsedOutput = {
841
841
  ...output,
842
- body: await parseBody(output.body, context),
842
+ body: await parseErrorBody(output.body, context),
843
843
  };
844
844
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
845
845
  switch (errorCode) {
@@ -876,7 +876,7 @@ exports.deserializeAws_json1_1ListClusterJobsCommand = deserializeAws_json1_1Lis
876
876
  const deserializeAws_json1_1ListClusterJobsCommandError = async (output, context) => {
877
877
  const parsedOutput = {
878
878
  ...output,
879
- body: await parseBody(output.body, context),
879
+ body: await parseErrorBody(output.body, context),
880
880
  };
881
881
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
882
882
  switch (errorCode) {
@@ -913,7 +913,7 @@ exports.deserializeAws_json1_1ListClustersCommand = deserializeAws_json1_1ListCl
913
913
  const deserializeAws_json1_1ListClustersCommandError = async (output, context) => {
914
914
  const parsedOutput = {
915
915
  ...output,
916
- body: await parseBody(output.body, context),
916
+ body: await parseErrorBody(output.body, context),
917
917
  };
918
918
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
919
919
  switch (errorCode) {
@@ -947,7 +947,7 @@ exports.deserializeAws_json1_1ListCompatibleImagesCommand = deserializeAws_json1
947
947
  const deserializeAws_json1_1ListCompatibleImagesCommandError = async (output, context) => {
948
948
  const parsedOutput = {
949
949
  ...output,
950
- body: await parseBody(output.body, context),
950
+ body: await parseErrorBody(output.body, context),
951
951
  };
952
952
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
953
953
  switch (errorCode) {
@@ -984,7 +984,7 @@ exports.deserializeAws_json1_1ListJobsCommand = deserializeAws_json1_1ListJobsCo
984
984
  const deserializeAws_json1_1ListJobsCommandError = async (output, context) => {
985
985
  const parsedOutput = {
986
986
  ...output,
987
- body: await parseBody(output.body, context),
987
+ body: await parseErrorBody(output.body, context),
988
988
  };
989
989
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
990
990
  switch (errorCode) {
@@ -1018,7 +1018,7 @@ exports.deserializeAws_json1_1ListLongTermPricingCommand = deserializeAws_json1_
1018
1018
  const deserializeAws_json1_1ListLongTermPricingCommandError = async (output, context) => {
1019
1019
  const parsedOutput = {
1020
1020
  ...output,
1021
- body: await parseBody(output.body, context),
1021
+ body: await parseErrorBody(output.body, context),
1022
1022
  };
1023
1023
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1024
1024
  switch (errorCode) {
@@ -1055,7 +1055,7 @@ exports.deserializeAws_json1_1UpdateClusterCommand = deserializeAws_json1_1Updat
1055
1055
  const deserializeAws_json1_1UpdateClusterCommandError = async (output, context) => {
1056
1056
  const parsedOutput = {
1057
1057
  ...output,
1058
- body: await parseBody(output.body, context),
1058
+ body: await parseErrorBody(output.body, context),
1059
1059
  };
1060
1060
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1061
1061
  switch (errorCode) {
@@ -1101,7 +1101,7 @@ exports.deserializeAws_json1_1UpdateJobCommand = deserializeAws_json1_1UpdateJob
1101
1101
  const deserializeAws_json1_1UpdateJobCommandError = async (output, context) => {
1102
1102
  const parsedOutput = {
1103
1103
  ...output,
1104
- body: await parseBody(output.body, context),
1104
+ body: await parseErrorBody(output.body, context),
1105
1105
  };
1106
1106
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1107
1107
  switch (errorCode) {
@@ -1150,7 +1150,7 @@ exports.deserializeAws_json1_1UpdateJobShipmentStateCommand = deserializeAws_jso
1150
1150
  const deserializeAws_json1_1UpdateJobShipmentStateCommandError = async (output, context) => {
1151
1151
  const parsedOutput = {
1152
1152
  ...output,
1153
- body: await parseBody(output.body, context),
1153
+ body: await parseErrorBody(output.body, context),
1154
1154
  };
1155
1155
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1156
1156
  switch (errorCode) {
@@ -1187,7 +1187,7 @@ exports.deserializeAws_json1_1UpdateLongTermPricingCommand = deserializeAws_json
1187
1187
  const deserializeAws_json1_1UpdateLongTermPricingCommandError = async (output, context) => {
1188
1188
  const parsedOutput = {
1189
1189
  ...output,
1190
- body: await parseBody(output.body, context),
1190
+ body: await parseErrorBody(output.body, context),
1191
1191
  };
1192
1192
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1193
1193
  switch (errorCode) {
@@ -2307,6 +2307,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
2307
2307
  }
2308
2308
  return {};
2309
2309
  });
2310
+ const parseErrorBody = async (errorBody, context) => {
2311
+ var _a;
2312
+ const value = await parseBody(errorBody, context);
2313
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2314
+ return value;
2315
+ };
2310
2316
  const loadRestJsonErrorCode = (output, data) => {
2311
2317
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2312
2318
  const sanitizeErrorCode = (rawValue) => {
@@ -304,7 +304,7 @@ var deserializeAws_json1_1CancelClusterCommandError = function (output, context)
304
304
  case 0:
305
305
  _a = [__assign({}, output)];
306
306
  _c = {};
307
- return [4, parseBody(output.body, context)];
307
+ return [4, parseErrorBody(output.body, context)];
308
308
  case 1:
309
309
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
310
310
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -363,7 +363,7 @@ var deserializeAws_json1_1CancelJobCommandError = function (output, context) { r
363
363
  case 0:
364
364
  _a = [__assign({}, output)];
365
365
  _c = {};
366
- return [4, parseBody(output.body, context)];
366
+ return [4, parseErrorBody(output.body, context)];
367
367
  case 1:
368
368
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
369
369
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -422,7 +422,7 @@ var deserializeAws_json1_1CreateAddressCommandError = function (output, context)
422
422
  case 0:
423
423
  _a = [__assign({}, output)];
424
424
  _c = {};
425
- return [4, parseBody(output.body, context)];
425
+ return [4, parseErrorBody(output.body, context)];
426
426
  case 1:
427
427
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
428
428
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -477,7 +477,7 @@ var deserializeAws_json1_1CreateClusterCommandError = function (output, context)
477
477
  case 0:
478
478
  _a = [__assign({}, output)];
479
479
  _c = {};
480
- return [4, parseBody(output.body, context)];
480
+ return [4, parseErrorBody(output.body, context)];
481
481
  case 1:
482
482
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
483
483
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -540,7 +540,7 @@ var deserializeAws_json1_1CreateJobCommandError = function (output, context) { r
540
540
  case 0:
541
541
  _a = [__assign({}, output)];
542
542
  _c = {};
543
- return [4, parseBody(output.body, context)];
543
+ return [4, parseErrorBody(output.body, context)];
544
544
  case 1:
545
545
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
546
546
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -607,7 +607,7 @@ var deserializeAws_json1_1CreateLongTermPricingCommandError = function (output,
607
607
  case 0:
608
608
  _a = [__assign({}, output)];
609
609
  _c = {};
610
- return [4, parseBody(output.body, context)];
610
+ return [4, parseErrorBody(output.body, context)];
611
611
  case 1:
612
612
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
613
613
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -658,7 +658,7 @@ var deserializeAws_json1_1CreateReturnShippingLabelCommandError = function (outp
658
658
  case 0:
659
659
  _a = [__assign({}, output)];
660
660
  _c = {};
661
- return [4, parseBody(output.body, context)];
661
+ return [4, parseErrorBody(output.body, context)];
662
662
  case 1:
663
663
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
664
664
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -725,7 +725,7 @@ var deserializeAws_json1_1DescribeAddressCommandError = function (output, contex
725
725
  case 0:
726
726
  _a = [__assign({}, output)];
727
727
  _c = {};
728
- return [4, parseBody(output.body, context)];
728
+ return [4, parseErrorBody(output.body, context)];
729
729
  case 1:
730
730
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
731
731
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -776,7 +776,7 @@ var deserializeAws_json1_1DescribeAddressesCommandError = function (output, cont
776
776
  case 0:
777
777
  _a = [__assign({}, output)];
778
778
  _c = {};
779
- return [4, parseBody(output.body, context)];
779
+ return [4, parseErrorBody(output.body, context)];
780
780
  case 1:
781
781
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
782
782
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -831,7 +831,7 @@ var deserializeAws_json1_1DescribeClusterCommandError = function (output, contex
831
831
  case 0:
832
832
  _a = [__assign({}, output)];
833
833
  _c = {};
834
- return [4, parseBody(output.body, context)];
834
+ return [4, parseErrorBody(output.body, context)];
835
835
  case 1:
836
836
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
837
837
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -882,7 +882,7 @@ var deserializeAws_json1_1DescribeJobCommandError = function (output, context) {
882
882
  case 0:
883
883
  _a = [__assign({}, output)];
884
884
  _c = {};
885
- return [4, parseBody(output.body, context)];
885
+ return [4, parseErrorBody(output.body, context)];
886
886
  case 1:
887
887
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
888
888
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -933,7 +933,7 @@ var deserializeAws_json1_1DescribeReturnShippingLabelCommandError = function (ou
933
933
  case 0:
934
934
  _a = [__assign({}, output)];
935
935
  _c = {};
936
- return [4, parseBody(output.body, context)];
936
+ return [4, parseErrorBody(output.body, context)];
937
937
  case 1:
938
938
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
939
939
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -992,7 +992,7 @@ var deserializeAws_json1_1GetJobManifestCommandError = function (output, context
992
992
  case 0:
993
993
  _a = [__assign({}, output)];
994
994
  _c = {};
995
- return [4, parseBody(output.body, context)];
995
+ return [4, parseErrorBody(output.body, context)];
996
996
  case 1:
997
997
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
998
998
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1047,7 +1047,7 @@ var deserializeAws_json1_1GetJobUnlockCodeCommandError = function (output, conte
1047
1047
  case 0:
1048
1048
  _a = [__assign({}, output)];
1049
1049
  _c = {};
1050
- return [4, parseBody(output.body, context)];
1050
+ return [4, parseErrorBody(output.body, context)];
1051
1051
  case 1:
1052
1052
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1053
1053
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1102,7 +1102,7 @@ var deserializeAws_json1_1GetSnowballUsageCommandError = function (output, conte
1102
1102
  case 0:
1103
1103
  _a = [__assign({}, output)];
1104
1104
  _b = {};
1105
- return [4, parseBody(output.body, context)];
1105
+ return [4, parseErrorBody(output.body, context)];
1106
1106
  case 1:
1107
1107
  parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
1108
1108
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1143,7 +1143,7 @@ var deserializeAws_json1_1GetSoftwareUpdatesCommandError = function (output, con
1143
1143
  case 0:
1144
1144
  _a = [__assign({}, output)];
1145
1145
  _c = {};
1146
- return [4, parseBody(output.body, context)];
1146
+ return [4, parseErrorBody(output.body, context)];
1147
1147
  case 1:
1148
1148
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1149
1149
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1198,7 +1198,7 @@ var deserializeAws_json1_1ListClusterJobsCommandError = function (output, contex
1198
1198
  case 0:
1199
1199
  _a = [__assign({}, output)];
1200
1200
  _c = {};
1201
- return [4, parseBody(output.body, context)];
1201
+ return [4, parseErrorBody(output.body, context)];
1202
1202
  case 1:
1203
1203
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1204
1204
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1253,7 +1253,7 @@ var deserializeAws_json1_1ListClustersCommandError = function (output, context)
1253
1253
  case 0:
1254
1254
  _a = [__assign({}, output)];
1255
1255
  _c = {};
1256
- return [4, parseBody(output.body, context)];
1256
+ return [4, parseErrorBody(output.body, context)];
1257
1257
  case 1:
1258
1258
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1259
1259
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1304,7 +1304,7 @@ var deserializeAws_json1_1ListCompatibleImagesCommandError = function (output, c
1304
1304
  case 0:
1305
1305
  _a = [__assign({}, output)];
1306
1306
  _c = {};
1307
- return [4, parseBody(output.body, context)];
1307
+ return [4, parseErrorBody(output.body, context)];
1308
1308
  case 1:
1309
1309
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1310
1310
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1359,7 +1359,7 @@ var deserializeAws_json1_1ListJobsCommandError = function (output, context) { re
1359
1359
  case 0:
1360
1360
  _a = [__assign({}, output)];
1361
1361
  _c = {};
1362
- return [4, parseBody(output.body, context)];
1362
+ return [4, parseErrorBody(output.body, context)];
1363
1363
  case 1:
1364
1364
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1365
1365
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1410,7 +1410,7 @@ var deserializeAws_json1_1ListLongTermPricingCommandError = function (output, co
1410
1410
  case 0:
1411
1411
  _a = [__assign({}, output)];
1412
1412
  _c = {};
1413
- return [4, parseBody(output.body, context)];
1413
+ return [4, parseErrorBody(output.body, context)];
1414
1414
  case 1:
1415
1415
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1416
1416
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1465,7 +1465,7 @@ var deserializeAws_json1_1UpdateClusterCommandError = function (output, context)
1465
1465
  case 0:
1466
1466
  _a = [__assign({}, output)];
1467
1467
  _c = {};
1468
- return [4, parseBody(output.body, context)];
1468
+ return [4, parseErrorBody(output.body, context)];
1469
1469
  case 1:
1470
1470
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1471
1471
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1532,7 +1532,7 @@ var deserializeAws_json1_1UpdateJobCommandError = function (output, context) { r
1532
1532
  case 0:
1533
1533
  _a = [__assign({}, output)];
1534
1534
  _c = {};
1535
- return [4, parseBody(output.body, context)];
1535
+ return [4, parseErrorBody(output.body, context)];
1536
1536
  case 1:
1537
1537
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1538
1538
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1603,7 +1603,7 @@ var deserializeAws_json1_1UpdateJobShipmentStateCommandError = function (output,
1603
1603
  case 0:
1604
1604
  _a = [__assign({}, output)];
1605
1605
  _c = {};
1606
- return [4, parseBody(output.body, context)];
1606
+ return [4, parseErrorBody(output.body, context)];
1607
1607
  case 1:
1608
1608
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1609
1609
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1658,7 +1658,7 @@ var deserializeAws_json1_1UpdateLongTermPricingCommandError = function (output,
1658
1658
  case 0:
1659
1659
  _a = [__assign({}, output)];
1660
1660
  _c = {};
1661
- return [4, parseBody(output.body, context)];
1661
+ return [4, parseErrorBody(output.body, context)];
1662
1662
  case 1:
1663
1663
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1664
1664
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2632,6 +2632,19 @@ var parseBody = function (streamBody, context) {
2632
2632
  return {};
2633
2633
  });
2634
2634
  };
2635
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
2636
+ var value;
2637
+ var _a;
2638
+ return __generator(this, function (_b) {
2639
+ switch (_b.label) {
2640
+ case 0: return [4, parseBody(errorBody, context)];
2641
+ case 1:
2642
+ value = _b.sent();
2643
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
2644
+ return [2, value];
2645
+ }
2646
+ });
2647
+ }); };
2635
2648
  var loadRestJsonErrorCode = function (output, data) {
2636
2649
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2637
2650
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-snowball",
3
3
  "description": "AWS SDK for JavaScript Snowball 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",