@aws-sdk/client-location 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
 
@@ -1602,7 +1602,7 @@ exports.deserializeAws_restJson1AssociateTrackerConsumerCommand = deserializeAws
1602
1602
  const deserializeAws_restJson1AssociateTrackerConsumerCommandError = async (output, context) => {
1603
1603
  const parsedOutput = {
1604
1604
  ...output,
1605
- body: await parseBody(output.body, context),
1605
+ body: await parseErrorBody(output.body, context),
1606
1606
  };
1607
1607
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1608
1608
  switch (errorCode) {
@@ -1654,7 +1654,7 @@ exports.deserializeAws_restJson1BatchDeleteDevicePositionHistoryCommand = deseri
1654
1654
  const deserializeAws_restJson1BatchDeleteDevicePositionHistoryCommandError = async (output, context) => {
1655
1655
  const parsedOutput = {
1656
1656
  ...output,
1657
- body: await parseBody(output.body, context),
1657
+ body: await parseErrorBody(output.body, context),
1658
1658
  };
1659
1659
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1660
1660
  switch (errorCode) {
@@ -1700,7 +1700,7 @@ exports.deserializeAws_restJson1BatchDeleteGeofenceCommand = deserializeAws_rest
1700
1700
  const deserializeAws_restJson1BatchDeleteGeofenceCommandError = async (output, context) => {
1701
1701
  const parsedOutput = {
1702
1702
  ...output,
1703
- body: await parseBody(output.body, context),
1703
+ body: await parseErrorBody(output.body, context),
1704
1704
  };
1705
1705
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1706
1706
  switch (errorCode) {
@@ -1746,7 +1746,7 @@ exports.deserializeAws_restJson1BatchEvaluateGeofencesCommand = deserializeAws_r
1746
1746
  const deserializeAws_restJson1BatchEvaluateGeofencesCommandError = async (output, context) => {
1747
1747
  const parsedOutput = {
1748
1748
  ...output,
1749
- body: await parseBody(output.body, context),
1749
+ body: await parseErrorBody(output.body, context),
1750
1750
  };
1751
1751
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1752
1752
  switch (errorCode) {
@@ -1795,7 +1795,7 @@ exports.deserializeAws_restJson1BatchGetDevicePositionCommand = deserializeAws_r
1795
1795
  const deserializeAws_restJson1BatchGetDevicePositionCommandError = async (output, context) => {
1796
1796
  const parsedOutput = {
1797
1797
  ...output,
1798
- body: await parseBody(output.body, context),
1798
+ body: await parseErrorBody(output.body, context),
1799
1799
  };
1800
1800
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1801
1801
  switch (errorCode) {
@@ -1844,7 +1844,7 @@ exports.deserializeAws_restJson1BatchPutGeofenceCommand = deserializeAws_restJso
1844
1844
  const deserializeAws_restJson1BatchPutGeofenceCommandError = async (output, context) => {
1845
1845
  const parsedOutput = {
1846
1846
  ...output,
1847
- body: await parseBody(output.body, context),
1847
+ body: await parseErrorBody(output.body, context),
1848
1848
  };
1849
1849
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1850
1850
  switch (errorCode) {
@@ -1890,7 +1890,7 @@ exports.deserializeAws_restJson1BatchUpdateDevicePositionCommand = deserializeAw
1890
1890
  const deserializeAws_restJson1BatchUpdateDevicePositionCommandError = async (output, context) => {
1891
1891
  const parsedOutput = {
1892
1892
  ...output,
1893
- body: await parseBody(output.body, context),
1893
+ body: await parseErrorBody(output.body, context),
1894
1894
  };
1895
1895
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1896
1896
  switch (errorCode) {
@@ -1939,7 +1939,7 @@ exports.deserializeAws_restJson1CalculateRouteCommand = deserializeAws_restJson1
1939
1939
  const deserializeAws_restJson1CalculateRouteCommandError = async (output, context) => {
1940
1940
  const parsedOutput = {
1941
1941
  ...output,
1942
- body: await parseBody(output.body, context),
1942
+ body: await parseErrorBody(output.body, context),
1943
1943
  };
1944
1944
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1945
1945
  switch (errorCode) {
@@ -1994,7 +1994,7 @@ exports.deserializeAws_restJson1CalculateRouteMatrixCommand = deserializeAws_res
1994
1994
  const deserializeAws_restJson1CalculateRouteMatrixCommandError = async (output, context) => {
1995
1995
  const parsedOutput = {
1996
1996
  ...output,
1997
- body: await parseBody(output.body, context),
1997
+ body: await parseErrorBody(output.body, context),
1998
1998
  };
1999
1999
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2000
2000
  switch (errorCode) {
@@ -2046,7 +2046,7 @@ exports.deserializeAws_restJson1CreateGeofenceCollectionCommand = deserializeAws
2046
2046
  const deserializeAws_restJson1CreateGeofenceCollectionCommandError = async (output, context) => {
2047
2047
  const parsedOutput = {
2048
2048
  ...output,
2049
- body: await parseBody(output.body, context),
2049
+ body: await parseErrorBody(output.body, context),
2050
2050
  };
2051
2051
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2052
2052
  switch (errorCode) {
@@ -2098,7 +2098,7 @@ exports.deserializeAws_restJson1CreateMapCommand = deserializeAws_restJson1Creat
2098
2098
  const deserializeAws_restJson1CreateMapCommandError = async (output, context) => {
2099
2099
  const parsedOutput = {
2100
2100
  ...output,
2101
- body: await parseBody(output.body, context),
2101
+ body: await parseErrorBody(output.body, context),
2102
2102
  };
2103
2103
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2104
2104
  switch (errorCode) {
@@ -2150,7 +2150,7 @@ exports.deserializeAws_restJson1CreatePlaceIndexCommand = deserializeAws_restJso
2150
2150
  const deserializeAws_restJson1CreatePlaceIndexCommandError = async (output, context) => {
2151
2151
  const parsedOutput = {
2152
2152
  ...output,
2153
- body: await parseBody(output.body, context),
2153
+ body: await parseErrorBody(output.body, context),
2154
2154
  };
2155
2155
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2156
2156
  switch (errorCode) {
@@ -2202,7 +2202,7 @@ exports.deserializeAws_restJson1CreateRouteCalculatorCommand = deserializeAws_re
2202
2202
  const deserializeAws_restJson1CreateRouteCalculatorCommandError = async (output, context) => {
2203
2203
  const parsedOutput = {
2204
2204
  ...output,
2205
- body: await parseBody(output.body, context),
2205
+ body: await parseErrorBody(output.body, context),
2206
2206
  };
2207
2207
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2208
2208
  switch (errorCode) {
@@ -2254,7 +2254,7 @@ exports.deserializeAws_restJson1CreateTrackerCommand = deserializeAws_restJson1C
2254
2254
  const deserializeAws_restJson1CreateTrackerCommandError = async (output, context) => {
2255
2255
  const parsedOutput = {
2256
2256
  ...output,
2257
- body: await parseBody(output.body, context),
2257
+ body: await parseErrorBody(output.body, context),
2258
2258
  };
2259
2259
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2260
2260
  switch (errorCode) {
@@ -2297,7 +2297,7 @@ exports.deserializeAws_restJson1DeleteGeofenceCollectionCommand = deserializeAws
2297
2297
  const deserializeAws_restJson1DeleteGeofenceCollectionCommandError = async (output, context) => {
2298
2298
  const parsedOutput = {
2299
2299
  ...output,
2300
- body: await parseBody(output.body, context),
2300
+ body: await parseErrorBody(output.body, context),
2301
2301
  };
2302
2302
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2303
2303
  switch (errorCode) {
@@ -2340,7 +2340,7 @@ exports.deserializeAws_restJson1DeleteMapCommand = deserializeAws_restJson1Delet
2340
2340
  const deserializeAws_restJson1DeleteMapCommandError = async (output, context) => {
2341
2341
  const parsedOutput = {
2342
2342
  ...output,
2343
- body: await parseBody(output.body, context),
2343
+ body: await parseErrorBody(output.body, context),
2344
2344
  };
2345
2345
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2346
2346
  switch (errorCode) {
@@ -2383,7 +2383,7 @@ exports.deserializeAws_restJson1DeletePlaceIndexCommand = deserializeAws_restJso
2383
2383
  const deserializeAws_restJson1DeletePlaceIndexCommandError = async (output, context) => {
2384
2384
  const parsedOutput = {
2385
2385
  ...output,
2386
- body: await parseBody(output.body, context),
2386
+ body: await parseErrorBody(output.body, context),
2387
2387
  };
2388
2388
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2389
2389
  switch (errorCode) {
@@ -2426,7 +2426,7 @@ exports.deserializeAws_restJson1DeleteRouteCalculatorCommand = deserializeAws_re
2426
2426
  const deserializeAws_restJson1DeleteRouteCalculatorCommandError = async (output, context) => {
2427
2427
  const parsedOutput = {
2428
2428
  ...output,
2429
- body: await parseBody(output.body, context),
2429
+ body: await parseErrorBody(output.body, context),
2430
2430
  };
2431
2431
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2432
2432
  switch (errorCode) {
@@ -2469,7 +2469,7 @@ exports.deserializeAws_restJson1DeleteTrackerCommand = deserializeAws_restJson1D
2469
2469
  const deserializeAws_restJson1DeleteTrackerCommandError = async (output, context) => {
2470
2470
  const parsedOutput = {
2471
2471
  ...output,
2472
- body: await parseBody(output.body, context),
2472
+ body: await parseErrorBody(output.body, context),
2473
2473
  };
2474
2474
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2475
2475
  switch (errorCode) {
@@ -2539,7 +2539,7 @@ exports.deserializeAws_restJson1DescribeGeofenceCollectionCommand = deserializeA
2539
2539
  const deserializeAws_restJson1DescribeGeofenceCollectionCommandError = async (output, context) => {
2540
2540
  const parsedOutput = {
2541
2541
  ...output,
2542
- body: await parseBody(output.body, context),
2542
+ body: await parseErrorBody(output.body, context),
2543
2543
  };
2544
2544
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2545
2545
  switch (errorCode) {
@@ -2609,7 +2609,7 @@ exports.deserializeAws_restJson1DescribeMapCommand = deserializeAws_restJson1Des
2609
2609
  const deserializeAws_restJson1DescribeMapCommandError = async (output, context) => {
2610
2610
  const parsedOutput = {
2611
2611
  ...output,
2612
- body: await parseBody(output.body, context),
2612
+ body: await parseErrorBody(output.body, context),
2613
2613
  };
2614
2614
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2615
2615
  switch (errorCode) {
@@ -2679,7 +2679,7 @@ exports.deserializeAws_restJson1DescribePlaceIndexCommand = deserializeAws_restJ
2679
2679
  const deserializeAws_restJson1DescribePlaceIndexCommandError = async (output, context) => {
2680
2680
  const parsedOutput = {
2681
2681
  ...output,
2682
- body: await parseBody(output.body, context),
2682
+ body: await parseErrorBody(output.body, context),
2683
2683
  };
2684
2684
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2685
2685
  switch (errorCode) {
@@ -2746,7 +2746,7 @@ exports.deserializeAws_restJson1DescribeRouteCalculatorCommand = deserializeAws_
2746
2746
  const deserializeAws_restJson1DescribeRouteCalculatorCommandError = async (output, context) => {
2747
2747
  const parsedOutput = {
2748
2748
  ...output,
2749
- body: await parseBody(output.body, context),
2749
+ body: await parseErrorBody(output.body, context),
2750
2750
  };
2751
2751
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2752
2752
  switch (errorCode) {
@@ -2819,7 +2819,7 @@ exports.deserializeAws_restJson1DescribeTrackerCommand = deserializeAws_restJson
2819
2819
  const deserializeAws_restJson1DescribeTrackerCommandError = async (output, context) => {
2820
2820
  const parsedOutput = {
2821
2821
  ...output,
2822
- body: await parseBody(output.body, context),
2822
+ body: await parseErrorBody(output.body, context),
2823
2823
  };
2824
2824
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2825
2825
  switch (errorCode) {
@@ -2862,7 +2862,7 @@ exports.deserializeAws_restJson1DisassociateTrackerConsumerCommand = deserialize
2862
2862
  const deserializeAws_restJson1DisassociateTrackerConsumerCommandError = async (output, context) => {
2863
2863
  const parsedOutput = {
2864
2864
  ...output,
2865
- body: await parseBody(output.body, context),
2865
+ body: await parseErrorBody(output.body, context),
2866
2866
  };
2867
2867
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2868
2868
  switch (errorCode) {
@@ -2923,7 +2923,7 @@ exports.deserializeAws_restJson1GetDevicePositionCommand = deserializeAws_restJs
2923
2923
  const deserializeAws_restJson1GetDevicePositionCommandError = async (output, context) => {
2924
2924
  const parsedOutput = {
2925
2925
  ...output,
2926
- body: await parseBody(output.body, context),
2926
+ body: await parseErrorBody(output.body, context),
2927
2927
  };
2928
2928
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2929
2929
  switch (errorCode) {
@@ -2972,7 +2972,7 @@ exports.deserializeAws_restJson1GetDevicePositionHistoryCommand = deserializeAws
2972
2972
  const deserializeAws_restJson1GetDevicePositionHistoryCommandError = async (output, context) => {
2973
2973
  const parsedOutput = {
2974
2974
  ...output,
2975
- body: await parseBody(output.body, context),
2975
+ body: await parseErrorBody(output.body, context),
2976
2976
  };
2977
2977
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2978
2978
  switch (errorCode) {
@@ -3030,7 +3030,7 @@ exports.deserializeAws_restJson1GetGeofenceCommand = deserializeAws_restJson1Get
3030
3030
  const deserializeAws_restJson1GetGeofenceCommandError = async (output, context) => {
3031
3031
  const parsedOutput = {
3032
3032
  ...output,
3033
- body: await parseBody(output.body, context),
3033
+ body: await parseErrorBody(output.body, context),
3034
3034
  };
3035
3035
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3036
3036
  switch (errorCode) {
@@ -3075,7 +3075,7 @@ exports.deserializeAws_restJson1GetMapGlyphsCommand = deserializeAws_restJson1Ge
3075
3075
  const deserializeAws_restJson1GetMapGlyphsCommandError = async (output, context) => {
3076
3076
  const parsedOutput = {
3077
3077
  ...output,
3078
- body: await parseBody(output.body, context),
3078
+ body: await parseErrorBody(output.body, context),
3079
3079
  };
3080
3080
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3081
3081
  switch (errorCode) {
@@ -3120,7 +3120,7 @@ exports.deserializeAws_restJson1GetMapSpritesCommand = deserializeAws_restJson1G
3120
3120
  const deserializeAws_restJson1GetMapSpritesCommandError = async (output, context) => {
3121
3121
  const parsedOutput = {
3122
3122
  ...output,
3123
- body: await parseBody(output.body, context),
3123
+ body: await parseErrorBody(output.body, context),
3124
3124
  };
3125
3125
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3126
3126
  switch (errorCode) {
@@ -3165,7 +3165,7 @@ exports.deserializeAws_restJson1GetMapStyleDescriptorCommand = deserializeAws_re
3165
3165
  const deserializeAws_restJson1GetMapStyleDescriptorCommandError = async (output, context) => {
3166
3166
  const parsedOutput = {
3167
3167
  ...output,
3168
- body: await parseBody(output.body, context),
3168
+ body: await parseErrorBody(output.body, context),
3169
3169
  };
3170
3170
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3171
3171
  switch (errorCode) {
@@ -3210,7 +3210,7 @@ exports.deserializeAws_restJson1GetMapTileCommand = deserializeAws_restJson1GetM
3210
3210
  const deserializeAws_restJson1GetMapTileCommandError = async (output, context) => {
3211
3211
  const parsedOutput = {
3212
3212
  ...output,
3213
- body: await parseBody(output.body, context),
3213
+ body: await parseErrorBody(output.body, context),
3214
3214
  };
3215
3215
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3216
3216
  switch (errorCode) {
@@ -3256,7 +3256,7 @@ exports.deserializeAws_restJson1GetPlaceCommand = deserializeAws_restJson1GetPla
3256
3256
  const deserializeAws_restJson1GetPlaceCommandError = async (output, context) => {
3257
3257
  const parsedOutput = {
3258
3258
  ...output,
3259
- body: await parseBody(output.body, context),
3259
+ body: await parseErrorBody(output.body, context),
3260
3260
  };
3261
3261
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3262
3262
  switch (errorCode) {
@@ -3305,7 +3305,7 @@ exports.deserializeAws_restJson1ListDevicePositionsCommand = deserializeAws_rest
3305
3305
  const deserializeAws_restJson1ListDevicePositionsCommandError = async (output, context) => {
3306
3306
  const parsedOutput = {
3307
3307
  ...output,
3308
- body: await parseBody(output.body, context),
3308
+ body: await parseErrorBody(output.body, context),
3309
3309
  };
3310
3310
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3311
3311
  switch (errorCode) {
@@ -3351,7 +3351,7 @@ exports.deserializeAws_restJson1ListGeofenceCollectionsCommand = deserializeAws_
3351
3351
  const deserializeAws_restJson1ListGeofenceCollectionsCommandError = async (output, context) => {
3352
3352
  const parsedOutput = {
3353
3353
  ...output,
3354
- body: await parseBody(output.body, context),
3354
+ body: await parseErrorBody(output.body, context),
3355
3355
  };
3356
3356
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3357
3357
  switch (errorCode) {
@@ -3397,7 +3397,7 @@ exports.deserializeAws_restJson1ListGeofencesCommand = deserializeAws_restJson1L
3397
3397
  const deserializeAws_restJson1ListGeofencesCommandError = async (output, context) => {
3398
3398
  const parsedOutput = {
3399
3399
  ...output,
3400
- body: await parseBody(output.body, context),
3400
+ body: await parseErrorBody(output.body, context),
3401
3401
  };
3402
3402
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3403
3403
  switch (errorCode) {
@@ -3446,7 +3446,7 @@ exports.deserializeAws_restJson1ListMapsCommand = deserializeAws_restJson1ListMa
3446
3446
  const deserializeAws_restJson1ListMapsCommandError = async (output, context) => {
3447
3447
  const parsedOutput = {
3448
3448
  ...output,
3449
- body: await parseBody(output.body, context),
3449
+ body: await parseErrorBody(output.body, context),
3450
3450
  };
3451
3451
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3452
3452
  switch (errorCode) {
@@ -3492,7 +3492,7 @@ exports.deserializeAws_restJson1ListPlaceIndexesCommand = deserializeAws_restJso
3492
3492
  const deserializeAws_restJson1ListPlaceIndexesCommandError = async (output, context) => {
3493
3493
  const parsedOutput = {
3494
3494
  ...output,
3495
- body: await parseBody(output.body, context),
3495
+ body: await parseErrorBody(output.body, context),
3496
3496
  };
3497
3497
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3498
3498
  switch (errorCode) {
@@ -3538,7 +3538,7 @@ exports.deserializeAws_restJson1ListRouteCalculatorsCommand = deserializeAws_res
3538
3538
  const deserializeAws_restJson1ListRouteCalculatorsCommandError = async (output, context) => {
3539
3539
  const parsedOutput = {
3540
3540
  ...output,
3541
- body: await parseBody(output.body, context),
3541
+ body: await parseErrorBody(output.body, context),
3542
3542
  };
3543
3543
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3544
3544
  switch (errorCode) {
@@ -3581,7 +3581,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
3581
3581
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
3582
3582
  const parsedOutput = {
3583
3583
  ...output,
3584
- body: await parseBody(output.body, context),
3584
+ body: await parseErrorBody(output.body, context),
3585
3585
  };
3586
3586
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3587
3587
  switch (errorCode) {
@@ -3630,7 +3630,7 @@ exports.deserializeAws_restJson1ListTrackerConsumersCommand = deserializeAws_res
3630
3630
  const deserializeAws_restJson1ListTrackerConsumersCommandError = async (output, context) => {
3631
3631
  const parsedOutput = {
3632
3632
  ...output,
3633
- body: await parseBody(output.body, context),
3633
+ body: await parseErrorBody(output.body, context),
3634
3634
  };
3635
3635
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3636
3636
  switch (errorCode) {
@@ -3679,7 +3679,7 @@ exports.deserializeAws_restJson1ListTrackersCommand = deserializeAws_restJson1Li
3679
3679
  const deserializeAws_restJson1ListTrackersCommandError = async (output, context) => {
3680
3680
  const parsedOutput = {
3681
3681
  ...output,
3682
- body: await parseBody(output.body, context),
3682
+ body: await parseErrorBody(output.body, context),
3683
3683
  };
3684
3684
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3685
3685
  switch (errorCode) {
@@ -3728,7 +3728,7 @@ exports.deserializeAws_restJson1PutGeofenceCommand = deserializeAws_restJson1Put
3728
3728
  const deserializeAws_restJson1PutGeofenceCommandError = async (output, context) => {
3729
3729
  const parsedOutput = {
3730
3730
  ...output,
3731
- body: await parseBody(output.body, context),
3731
+ body: await parseErrorBody(output.body, context),
3732
3732
  };
3733
3733
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3734
3734
  switch (errorCode) {
@@ -3780,7 +3780,7 @@ exports.deserializeAws_restJson1SearchPlaceIndexForPositionCommand = deserialize
3780
3780
  const deserializeAws_restJson1SearchPlaceIndexForPositionCommandError = async (output, context) => {
3781
3781
  const parsedOutput = {
3782
3782
  ...output,
3783
- body: await parseBody(output.body, context),
3783
+ body: await parseErrorBody(output.body, context),
3784
3784
  };
3785
3785
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3786
3786
  switch (errorCode) {
@@ -3829,7 +3829,7 @@ exports.deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommand = deserial
3829
3829
  const deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommandError = async (output, context) => {
3830
3830
  const parsedOutput = {
3831
3831
  ...output,
3832
- body: await parseBody(output.body, context),
3832
+ body: await parseErrorBody(output.body, context),
3833
3833
  };
3834
3834
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3835
3835
  switch (errorCode) {
@@ -3878,7 +3878,7 @@ exports.deserializeAws_restJson1SearchPlaceIndexForTextCommand = deserializeAws_
3878
3878
  const deserializeAws_restJson1SearchPlaceIndexForTextCommandError = async (output, context) => {
3879
3879
  const parsedOutput = {
3880
3880
  ...output,
3881
- body: await parseBody(output.body, context),
3881
+ body: await parseErrorBody(output.body, context),
3882
3882
  };
3883
3883
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3884
3884
  switch (errorCode) {
@@ -3921,7 +3921,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
3921
3921
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
3922
3922
  const parsedOutput = {
3923
3923
  ...output,
3924
- body: await parseBody(output.body, context),
3924
+ body: await parseErrorBody(output.body, context),
3925
3925
  };
3926
3926
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3927
3927
  switch (errorCode) {
@@ -3964,7 +3964,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
3964
3964
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
3965
3965
  const parsedOutput = {
3966
3966
  ...output,
3967
- body: await parseBody(output.body, context),
3967
+ body: await parseErrorBody(output.body, context),
3968
3968
  };
3969
3969
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3970
3970
  switch (errorCode) {
@@ -4016,7 +4016,7 @@ exports.deserializeAws_restJson1UpdateGeofenceCollectionCommand = deserializeAws
4016
4016
  const deserializeAws_restJson1UpdateGeofenceCollectionCommandError = async (output, context) => {
4017
4017
  const parsedOutput = {
4018
4018
  ...output,
4019
- body: await parseBody(output.body, context),
4019
+ body: await parseErrorBody(output.body, context),
4020
4020
  };
4021
4021
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4022
4022
  switch (errorCode) {
@@ -4068,7 +4068,7 @@ exports.deserializeAws_restJson1UpdateMapCommand = deserializeAws_restJson1Updat
4068
4068
  const deserializeAws_restJson1UpdateMapCommandError = async (output, context) => {
4069
4069
  const parsedOutput = {
4070
4070
  ...output,
4071
- body: await parseBody(output.body, context),
4071
+ body: await parseErrorBody(output.body, context),
4072
4072
  };
4073
4073
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4074
4074
  switch (errorCode) {
@@ -4120,7 +4120,7 @@ exports.deserializeAws_restJson1UpdatePlaceIndexCommand = deserializeAws_restJso
4120
4120
  const deserializeAws_restJson1UpdatePlaceIndexCommandError = async (output, context) => {
4121
4121
  const parsedOutput = {
4122
4122
  ...output,
4123
- body: await parseBody(output.body, context),
4123
+ body: await parseErrorBody(output.body, context),
4124
4124
  };
4125
4125
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4126
4126
  switch (errorCode) {
@@ -4172,7 +4172,7 @@ exports.deserializeAws_restJson1UpdateRouteCalculatorCommand = deserializeAws_re
4172
4172
  const deserializeAws_restJson1UpdateRouteCalculatorCommandError = async (output, context) => {
4173
4173
  const parsedOutput = {
4174
4174
  ...output,
4175
- body: await parseBody(output.body, context),
4175
+ body: await parseErrorBody(output.body, context),
4176
4176
  };
4177
4177
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4178
4178
  switch (errorCode) {
@@ -4224,7 +4224,7 @@ exports.deserializeAws_restJson1UpdateTrackerCommand = deserializeAws_restJson1U
4224
4224
  const deserializeAws_restJson1UpdateTrackerCommandError = async (output, context) => {
4225
4225
  const parsedOutput = {
4226
4226
  ...output,
4227
- body: await parseBody(output.body, context),
4227
+ body: await parseErrorBody(output.body, context),
4228
4228
  };
4229
4229
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4230
4230
  switch (errorCode) {
@@ -5210,6 +5210,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
5210
5210
  }
5211
5211
  return {};
5212
5212
  });
5213
+ const parseErrorBody = async (errorBody, context) => {
5214
+ var _a;
5215
+ const value = await parseBody(errorBody, context);
5216
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
5217
+ return value;
5218
+ };
5213
5219
  const loadRestJsonErrorCode = (output, data) => {
5214
5220
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
5215
5221
  const sanitizeErrorCode = (rawValue) => {
@@ -1843,7 +1843,7 @@ var deserializeAws_restJson1AssociateTrackerConsumerCommandError = function (out
1843
1843
  case 0:
1844
1844
  _a = [__assign({}, output)];
1845
1845
  _c = {};
1846
- return [4, parseBody(output.body, context)];
1846
+ return [4, parseErrorBody(output.body, context)];
1847
1847
  case 1:
1848
1848
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1849
1849
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -1923,7 +1923,7 @@ var deserializeAws_restJson1BatchDeleteDevicePositionHistoryCommandError = funct
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);
@@ -1995,7 +1995,7 @@ var deserializeAws_restJson1BatchDeleteGeofenceCommandError = function (output,
1995
1995
  case 0:
1996
1996
  _a = [__assign({}, output)];
1997
1997
  _c = {};
1998
- return [4, parseBody(output.body, context)];
1998
+ return [4, parseErrorBody(output.body, context)];
1999
1999
  case 1:
2000
2000
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2001
2001
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2067,7 +2067,7 @@ var deserializeAws_restJson1BatchEvaluateGeofencesCommandError = function (outpu
2067
2067
  case 0:
2068
2068
  _a = [__assign({}, output)];
2069
2069
  _c = {};
2070
- return [4, parseBody(output.body, context)];
2070
+ return [4, parseErrorBody(output.body, context)];
2071
2071
  case 1:
2072
2072
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2073
2073
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2142,7 +2142,7 @@ var deserializeAws_restJson1BatchGetDevicePositionCommandError = function (outpu
2142
2142
  case 0:
2143
2143
  _a = [__assign({}, output)];
2144
2144
  _c = {};
2145
- return [4, parseBody(output.body, context)];
2145
+ return [4, parseErrorBody(output.body, context)];
2146
2146
  case 1:
2147
2147
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2148
2148
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2217,7 +2217,7 @@ var deserializeAws_restJson1BatchPutGeofenceCommandError = function (output, con
2217
2217
  case 0:
2218
2218
  _a = [__assign({}, output)];
2219
2219
  _c = {};
2220
- return [4, parseBody(output.body, context)];
2220
+ return [4, parseErrorBody(output.body, context)];
2221
2221
  case 1:
2222
2222
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2223
2223
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2289,7 +2289,7 @@ var deserializeAws_restJson1BatchUpdateDevicePositionCommandError = function (ou
2289
2289
  case 0:
2290
2290
  _a = [__assign({}, output)];
2291
2291
  _c = {};
2292
- return [4, parseBody(output.body, context)];
2292
+ return [4, parseErrorBody(output.body, context)];
2293
2293
  case 1:
2294
2294
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2295
2295
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2364,7 +2364,7 @@ var deserializeAws_restJson1CalculateRouteCommandError = function (output, conte
2364
2364
  case 0:
2365
2365
  _a = [__assign({}, output)];
2366
2366
  _c = {};
2367
- return [4, parseBody(output.body, context)];
2367
+ return [4, parseErrorBody(output.body, context)];
2368
2368
  case 1:
2369
2369
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2370
2370
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2445,7 +2445,7 @@ var deserializeAws_restJson1CalculateRouteMatrixCommandError = function (output,
2445
2445
  case 0:
2446
2446
  _a = [__assign({}, output)];
2447
2447
  _c = {};
2448
- return [4, parseBody(output.body, context)];
2448
+ return [4, parseErrorBody(output.body, context)];
2449
2449
  case 1:
2450
2450
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2451
2451
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2523,7 +2523,7 @@ var deserializeAws_restJson1CreateGeofenceCollectionCommandError = function (out
2523
2523
  case 0:
2524
2524
  _a = [__assign({}, output)];
2525
2525
  _c = {};
2526
- return [4, parseBody(output.body, context)];
2526
+ return [4, parseErrorBody(output.body, context)];
2527
2527
  case 1:
2528
2528
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2529
2529
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2601,7 +2601,7 @@ var deserializeAws_restJson1CreateMapCommandError = function (output, context) {
2601
2601
  case 0:
2602
2602
  _a = [__assign({}, output)];
2603
2603
  _c = {};
2604
- return [4, parseBody(output.body, context)];
2604
+ return [4, parseErrorBody(output.body, context)];
2605
2605
  case 1:
2606
2606
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2607
2607
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2679,7 +2679,7 @@ var deserializeAws_restJson1CreatePlaceIndexCommandError = function (output, con
2679
2679
  case 0:
2680
2680
  _a = [__assign({}, output)];
2681
2681
  _c = {};
2682
- return [4, parseBody(output.body, context)];
2682
+ return [4, parseErrorBody(output.body, context)];
2683
2683
  case 1:
2684
2684
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2685
2685
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2757,7 +2757,7 @@ var deserializeAws_restJson1CreateRouteCalculatorCommandError = function (output
2757
2757
  case 0:
2758
2758
  _a = [__assign({}, output)];
2759
2759
  _c = {};
2760
- return [4, parseBody(output.body, context)];
2760
+ return [4, parseErrorBody(output.body, context)];
2761
2761
  case 1:
2762
2762
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2763
2763
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2835,7 +2835,7 @@ var deserializeAws_restJson1CreateTrackerCommandError = function (output, contex
2835
2835
  case 0:
2836
2836
  _a = [__assign({}, output)];
2837
2837
  _c = {};
2838
- return [4, parseBody(output.body, context)];
2838
+ return [4, parseErrorBody(output.body, context)];
2839
2839
  case 1:
2840
2840
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2841
2841
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2902,7 +2902,7 @@ var deserializeAws_restJson1DeleteGeofenceCollectionCommandError = function (out
2902
2902
  case 0:
2903
2903
  _a = [__assign({}, output)];
2904
2904
  _c = {};
2905
- return [4, parseBody(output.body, context)];
2905
+ return [4, parseErrorBody(output.body, context)];
2906
2906
  case 1:
2907
2907
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2908
2908
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -2969,7 +2969,7 @@ var deserializeAws_restJson1DeleteMapCommandError = function (output, context) {
2969
2969
  case 0:
2970
2970
  _a = [__assign({}, output)];
2971
2971
  _c = {};
2972
- return [4, parseBody(output.body, context)];
2972
+ return [4, parseErrorBody(output.body, context)];
2973
2973
  case 1:
2974
2974
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2975
2975
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3036,7 +3036,7 @@ var deserializeAws_restJson1DeletePlaceIndexCommandError = function (output, con
3036
3036
  case 0:
3037
3037
  _a = [__assign({}, output)];
3038
3038
  _c = {};
3039
- return [4, parseBody(output.body, context)];
3039
+ return [4, parseErrorBody(output.body, context)];
3040
3040
  case 1:
3041
3041
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3042
3042
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3103,7 +3103,7 @@ var deserializeAws_restJson1DeleteRouteCalculatorCommandError = function (output
3103
3103
  case 0:
3104
3104
  _a = [__assign({}, output)];
3105
3105
  _c = {};
3106
- return [4, parseBody(output.body, context)];
3106
+ return [4, parseErrorBody(output.body, context)];
3107
3107
  case 1:
3108
3108
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3109
3109
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3170,7 +3170,7 @@ var deserializeAws_restJson1DeleteTrackerCommandError = function (output, contex
3170
3170
  case 0:
3171
3171
  _a = [__assign({}, output)];
3172
3172
  _c = {};
3173
- return [4, parseBody(output.body, context)];
3173
+ return [4, parseErrorBody(output.body, context)];
3174
3174
  case 1:
3175
3175
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3176
3176
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3266,7 +3266,7 @@ var deserializeAws_restJson1DescribeGeofenceCollectionCommandError = function (o
3266
3266
  case 0:
3267
3267
  _a = [__assign({}, output)];
3268
3268
  _c = {};
3269
- return [4, parseBody(output.body, context)];
3269
+ return [4, parseErrorBody(output.body, context)];
3270
3270
  case 1:
3271
3271
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3272
3272
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3362,7 +3362,7 @@ var deserializeAws_restJson1DescribeMapCommandError = function (output, context)
3362
3362
  case 0:
3363
3363
  _a = [__assign({}, output)];
3364
3364
  _c = {};
3365
- return [4, parseBody(output.body, context)];
3365
+ return [4, parseErrorBody(output.body, context)];
3366
3366
  case 1:
3367
3367
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3368
3368
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3458,7 +3458,7 @@ var deserializeAws_restJson1DescribePlaceIndexCommandError = function (output, c
3458
3458
  case 0:
3459
3459
  _a = [__assign({}, output)];
3460
3460
  _c = {};
3461
- return [4, parseBody(output.body, context)];
3461
+ return [4, parseErrorBody(output.body, context)];
3462
3462
  case 1:
3463
3463
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3464
3464
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3551,7 +3551,7 @@ var deserializeAws_restJson1DescribeRouteCalculatorCommandError = function (outp
3551
3551
  case 0:
3552
3552
  _a = [__assign({}, output)];
3553
3553
  _c = {};
3554
- return [4, parseBody(output.body, context)];
3554
+ return [4, parseErrorBody(output.body, context)];
3555
3555
  case 1:
3556
3556
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3557
3557
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3650,7 +3650,7 @@ var deserializeAws_restJson1DescribeTrackerCommandError = function (output, cont
3650
3650
  case 0:
3651
3651
  _a = [__assign({}, output)];
3652
3652
  _c = {};
3653
- return [4, parseBody(output.body, context)];
3653
+ return [4, parseErrorBody(output.body, context)];
3654
3654
  case 1:
3655
3655
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3656
3656
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3717,7 +3717,7 @@ var deserializeAws_restJson1DisassociateTrackerConsumerCommandError = function (
3717
3717
  case 0:
3718
3718
  _a = [__assign({}, output)];
3719
3719
  _c = {};
3720
- return [4, parseBody(output.body, context)];
3720
+ return [4, parseErrorBody(output.body, context)];
3721
3721
  case 1:
3722
3722
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3723
3723
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3804,7 +3804,7 @@ var deserializeAws_restJson1GetDevicePositionCommandError = function (output, co
3804
3804
  case 0:
3805
3805
  _a = [__assign({}, output)];
3806
3806
  _c = {};
3807
- return [4, parseBody(output.body, context)];
3807
+ return [4, parseErrorBody(output.body, context)];
3808
3808
  case 1:
3809
3809
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3810
3810
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3879,7 +3879,7 @@ var deserializeAws_restJson1GetDevicePositionHistoryCommandError = function (out
3879
3879
  case 0:
3880
3880
  _a = [__assign({}, output)];
3881
3881
  _c = {};
3882
- return [4, parseBody(output.body, context)];
3882
+ return [4, parseErrorBody(output.body, context)];
3883
3883
  case 1:
3884
3884
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3885
3885
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -3963,7 +3963,7 @@ var deserializeAws_restJson1GetGeofenceCommandError = function (output, context)
3963
3963
  case 0:
3964
3964
  _a = [__assign({}, output)];
3965
3965
  _c = {};
3966
- return [4, parseBody(output.body, context)];
3966
+ return [4, parseErrorBody(output.body, context)];
3967
3967
  case 1:
3968
3968
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3969
3969
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4032,7 +4032,7 @@ var deserializeAws_restJson1GetMapGlyphsCommandError = function (output, context
4032
4032
  case 0:
4033
4033
  _a = [__assign({}, output)];
4034
4034
  _c = {};
4035
- return [4, parseBody(output.body, context)];
4035
+ return [4, parseErrorBody(output.body, context)];
4036
4036
  case 1:
4037
4037
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4038
4038
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4101,7 +4101,7 @@ var deserializeAws_restJson1GetMapSpritesCommandError = function (output, contex
4101
4101
  case 0:
4102
4102
  _a = [__assign({}, output)];
4103
4103
  _c = {};
4104
- return [4, parseBody(output.body, context)];
4104
+ return [4, parseErrorBody(output.body, context)];
4105
4105
  case 1:
4106
4106
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4107
4107
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4170,7 +4170,7 @@ var deserializeAws_restJson1GetMapStyleDescriptorCommandError = function (output
4170
4170
  case 0:
4171
4171
  _a = [__assign({}, output)];
4172
4172
  _c = {};
4173
- return [4, parseBody(output.body, context)];
4173
+ return [4, parseErrorBody(output.body, context)];
4174
4174
  case 1:
4175
4175
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4176
4176
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4239,7 +4239,7 @@ var deserializeAws_restJson1GetMapTileCommandError = function (output, context)
4239
4239
  case 0:
4240
4240
  _a = [__assign({}, output)];
4241
4241
  _c = {};
4242
- return [4, parseBody(output.body, context)];
4242
+ return [4, parseErrorBody(output.body, context)];
4243
4243
  case 1:
4244
4244
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4245
4245
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4311,7 +4311,7 @@ var deserializeAws_restJson1GetPlaceCommandError = function (output, context) {
4311
4311
  case 0:
4312
4312
  _a = [__assign({}, output)];
4313
4313
  _c = {};
4314
- return [4, parseBody(output.body, context)];
4314
+ return [4, parseErrorBody(output.body, context)];
4315
4315
  case 1:
4316
4316
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4317
4317
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4386,7 +4386,7 @@ var deserializeAws_restJson1ListDevicePositionsCommandError = function (output,
4386
4386
  case 0:
4387
4387
  _a = [__assign({}, output)];
4388
4388
  _c = {};
4389
- return [4, parseBody(output.body, context)];
4389
+ return [4, parseErrorBody(output.body, context)];
4390
4390
  case 1:
4391
4391
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4392
4392
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4457,7 +4457,7 @@ var deserializeAws_restJson1ListGeofenceCollectionsCommandError = function (outp
4457
4457
  case 0:
4458
4458
  _a = [__assign({}, output)];
4459
4459
  _c = {};
4460
- return [4, parseBody(output.body, context)];
4460
+ return [4, parseErrorBody(output.body, context)];
4461
4461
  case 1:
4462
4462
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4463
4463
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4528,7 +4528,7 @@ var deserializeAws_restJson1ListGeofencesCommandError = function (output, contex
4528
4528
  case 0:
4529
4529
  _a = [__assign({}, output)];
4530
4530
  _c = {};
4531
- return [4, parseBody(output.body, context)];
4531
+ return [4, parseErrorBody(output.body, context)];
4532
4532
  case 1:
4533
4533
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4534
4534
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4603,7 +4603,7 @@ var deserializeAws_restJson1ListMapsCommandError = function (output, context) {
4603
4603
  case 0:
4604
4604
  _a = [__assign({}, output)];
4605
4605
  _c = {};
4606
- return [4, parseBody(output.body, context)];
4606
+ return [4, parseErrorBody(output.body, context)];
4607
4607
  case 1:
4608
4608
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4609
4609
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4674,7 +4674,7 @@ var deserializeAws_restJson1ListPlaceIndexesCommandError = function (output, con
4674
4674
  case 0:
4675
4675
  _a = [__assign({}, output)];
4676
4676
  _c = {};
4677
- return [4, parseBody(output.body, context)];
4677
+ return [4, parseErrorBody(output.body, context)];
4678
4678
  case 1:
4679
4679
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4680
4680
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4745,7 +4745,7 @@ var deserializeAws_restJson1ListRouteCalculatorsCommandError = function (output,
4745
4745
  case 0:
4746
4746
  _a = [__assign({}, output)];
4747
4747
  _c = {};
4748
- return [4, parseBody(output.body, context)];
4748
+ return [4, parseErrorBody(output.body, context)];
4749
4749
  case 1:
4750
4750
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4751
4751
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4813,7 +4813,7 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
4813
4813
  case 0:
4814
4814
  _a = [__assign({}, output)];
4815
4815
  _c = {};
4816
- return [4, parseBody(output.body, context)];
4816
+ return [4, parseErrorBody(output.body, context)];
4817
4817
  case 1:
4818
4818
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4819
4819
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4888,7 +4888,7 @@ var deserializeAws_restJson1ListTrackerConsumersCommandError = function (output,
4888
4888
  case 0:
4889
4889
  _a = [__assign({}, output)];
4890
4890
  _c = {};
4891
- return [4, parseBody(output.body, context)];
4891
+ return [4, parseErrorBody(output.body, context)];
4892
4892
  case 1:
4893
4893
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4894
4894
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -4963,7 +4963,7 @@ var deserializeAws_restJson1ListTrackersCommandError = function (output, context
4963
4963
  case 0:
4964
4964
  _a = [__assign({}, output)];
4965
4965
  _c = {};
4966
- return [4, parseBody(output.body, context)];
4966
+ return [4, parseErrorBody(output.body, context)];
4967
4967
  case 1:
4968
4968
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4969
4969
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5037,7 +5037,7 @@ var deserializeAws_restJson1PutGeofenceCommandError = function (output, context)
5037
5037
  case 0:
5038
5038
  _a = [__assign({}, output)];
5039
5039
  _c = {};
5040
- return [4, parseBody(output.body, context)];
5040
+ return [4, parseErrorBody(output.body, context)];
5041
5041
  case 1:
5042
5042
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5043
5043
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5116,7 +5116,7 @@ var deserializeAws_restJson1SearchPlaceIndexForPositionCommandError = function (
5116
5116
  case 0:
5117
5117
  _a = [__assign({}, output)];
5118
5118
  _c = {};
5119
- return [4, parseBody(output.body, context)];
5119
+ return [4, parseErrorBody(output.body, context)];
5120
5120
  case 1:
5121
5121
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5122
5122
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5191,7 +5191,7 @@ var deserializeAws_restJson1SearchPlaceIndexForSuggestionsCommandError = functio
5191
5191
  case 0:
5192
5192
  _a = [__assign({}, output)];
5193
5193
  _c = {};
5194
- return [4, parseBody(output.body, context)];
5194
+ return [4, parseErrorBody(output.body, context)];
5195
5195
  case 1:
5196
5196
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5197
5197
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5266,7 +5266,7 @@ var deserializeAws_restJson1SearchPlaceIndexForTextCommandError = function (outp
5266
5266
  case 0:
5267
5267
  _a = [__assign({}, output)];
5268
5268
  _c = {};
5269
- return [4, parseBody(output.body, context)];
5269
+ return [4, parseErrorBody(output.body, context)];
5270
5270
  case 1:
5271
5271
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5272
5272
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5333,7 +5333,7 @@ var deserializeAws_restJson1TagResourceCommandError = function (output, context)
5333
5333
  case 0:
5334
5334
  _a = [__assign({}, output)];
5335
5335
  _c = {};
5336
- return [4, parseBody(output.body, context)];
5336
+ return [4, parseErrorBody(output.body, context)];
5337
5337
  case 1:
5338
5338
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5339
5339
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5400,7 +5400,7 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
5400
5400
  case 0:
5401
5401
  _a = [__assign({}, output)];
5402
5402
  _c = {};
5403
- return [4, parseBody(output.body, context)];
5403
+ return [4, parseErrorBody(output.body, context)];
5404
5404
  case 1:
5405
5405
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5406
5406
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5478,7 +5478,7 @@ var deserializeAws_restJson1UpdateGeofenceCollectionCommandError = function (out
5478
5478
  case 0:
5479
5479
  _a = [__assign({}, output)];
5480
5480
  _c = {};
5481
- return [4, parseBody(output.body, context)];
5481
+ return [4, parseErrorBody(output.body, context)];
5482
5482
  case 1:
5483
5483
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5484
5484
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5556,7 +5556,7 @@ var deserializeAws_restJson1UpdateMapCommandError = function (output, context) {
5556
5556
  case 0:
5557
5557
  _a = [__assign({}, output)];
5558
5558
  _c = {};
5559
- return [4, parseBody(output.body, context)];
5559
+ return [4, parseErrorBody(output.body, context)];
5560
5560
  case 1:
5561
5561
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5562
5562
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5634,7 +5634,7 @@ var deserializeAws_restJson1UpdatePlaceIndexCommandError = function (output, con
5634
5634
  case 0:
5635
5635
  _a = [__assign({}, output)];
5636
5636
  _c = {};
5637
- return [4, parseBody(output.body, context)];
5637
+ return [4, parseErrorBody(output.body, context)];
5638
5638
  case 1:
5639
5639
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5640
5640
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5712,7 +5712,7 @@ var deserializeAws_restJson1UpdateRouteCalculatorCommandError = function (output
5712
5712
  case 0:
5713
5713
  _a = [__assign({}, output)];
5714
5714
  _c = {};
5715
- return [4, parseBody(output.body, context)];
5715
+ return [4, parseErrorBody(output.body, context)];
5716
5716
  case 1:
5717
5717
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5718
5718
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -5790,7 +5790,7 @@ var deserializeAws_restJson1UpdateTrackerCommandError = function (output, contex
5790
5790
  case 0:
5791
5791
  _a = [__assign({}, output)];
5792
5792
  _c = {};
5793
- return [4, parseBody(output.body, context)];
5793
+ return [4, parseErrorBody(output.body, context)];
5794
5794
  case 1:
5795
5795
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5796
5796
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
@@ -6754,6 +6754,19 @@ var parseBody = function (streamBody, context) {
6754
6754
  return {};
6755
6755
  });
6756
6756
  };
6757
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
6758
+ var value;
6759
+ var _a;
6760
+ return __generator(this, function (_b) {
6761
+ switch (_b.label) {
6762
+ case 0: return [4, parseBody(errorBody, context)];
6763
+ case 1:
6764
+ value = _b.sent();
6765
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
6766
+ return [2, value];
6767
+ }
6768
+ });
6769
+ }); };
6757
6770
  var loadRestJsonErrorCode = function (output, data) {
6758
6771
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
6759
6772
  var sanitizeErrorCode = function (rawValue) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-location",
3
3
  "description": "AWS SDK for JavaScript Location 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",