@aws-sdk/client-iot 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.
@@ -5425,7 +5425,7 @@ exports.deserializeAws_restJson1AcceptCertificateTransferCommand = deserializeAw
5425
5425
  const deserializeAws_restJson1AcceptCertificateTransferCommandError = async (output, context) => {
5426
5426
  const parsedOutput = {
5427
5427
  ...output,
5428
- body: await parseBody(output.body, context),
5428
+ body: await parseErrorBody(output.body, context),
5429
5429
  };
5430
5430
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5431
5431
  switch (errorCode) {
@@ -5474,7 +5474,7 @@ exports.deserializeAws_restJson1AddThingToBillingGroupCommand = deserializeAws_r
5474
5474
  const deserializeAws_restJson1AddThingToBillingGroupCommandError = async (output, context) => {
5475
5475
  const parsedOutput = {
5476
5476
  ...output,
5477
- body: await parseBody(output.body, context),
5477
+ body: await parseErrorBody(output.body, context),
5478
5478
  };
5479
5479
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5480
5480
  switch (errorCode) {
@@ -5514,7 +5514,7 @@ exports.deserializeAws_restJson1AddThingToThingGroupCommand = deserializeAws_res
5514
5514
  const deserializeAws_restJson1AddThingToThingGroupCommandError = async (output, context) => {
5515
5515
  const parsedOutput = {
5516
5516
  ...output,
5517
- body: await parseBody(output.body, context),
5517
+ body: await parseErrorBody(output.body, context),
5518
5518
  };
5519
5519
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5520
5520
  switch (errorCode) {
@@ -5563,7 +5563,7 @@ exports.deserializeAws_restJson1AssociateTargetsWithJobCommand = deserializeAws_
5563
5563
  const deserializeAws_restJson1AssociateTargetsWithJobCommandError = async (output, context) => {
5564
5564
  const parsedOutput = {
5565
5565
  ...output,
5566
- body: await parseBody(output.body, context),
5566
+ body: await parseErrorBody(output.body, context),
5567
5567
  };
5568
5568
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5569
5569
  switch (errorCode) {
@@ -5606,7 +5606,7 @@ exports.deserializeAws_restJson1AttachPolicyCommand = deserializeAws_restJson1At
5606
5606
  const deserializeAws_restJson1AttachPolicyCommandError = async (output, context) => {
5607
5607
  const parsedOutput = {
5608
5608
  ...output,
5609
- body: await parseBody(output.body, context),
5609
+ body: await parseErrorBody(output.body, context),
5610
5610
  };
5611
5611
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5612
5612
  switch (errorCode) {
@@ -5655,7 +5655,7 @@ exports.deserializeAws_restJson1AttachPrincipalPolicyCommand = deserializeAws_re
5655
5655
  const deserializeAws_restJson1AttachPrincipalPolicyCommandError = async (output, context) => {
5656
5656
  const parsedOutput = {
5657
5657
  ...output,
5658
- body: await parseBody(output.body, context),
5658
+ body: await parseErrorBody(output.body, context),
5659
5659
  };
5660
5660
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5661
5661
  switch (errorCode) {
@@ -5704,7 +5704,7 @@ exports.deserializeAws_restJson1AttachSecurityProfileCommand = deserializeAws_re
5704
5704
  const deserializeAws_restJson1AttachSecurityProfileCommandError = async (output, context) => {
5705
5705
  const parsedOutput = {
5706
5706
  ...output,
5707
- body: await parseBody(output.body, context),
5707
+ body: await parseErrorBody(output.body, context),
5708
5708
  };
5709
5709
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5710
5710
  switch (errorCode) {
@@ -5750,7 +5750,7 @@ exports.deserializeAws_restJson1AttachThingPrincipalCommand = deserializeAws_res
5750
5750
  const deserializeAws_restJson1AttachThingPrincipalCommandError = async (output, context) => {
5751
5751
  const parsedOutput = {
5752
5752
  ...output,
5753
- body: await parseBody(output.body, context),
5753
+ body: await parseErrorBody(output.body, context),
5754
5754
  };
5755
5755
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5756
5756
  switch (errorCode) {
@@ -5796,7 +5796,7 @@ exports.deserializeAws_restJson1CancelAuditMitigationActionsTaskCommand = deseri
5796
5796
  const deserializeAws_restJson1CancelAuditMitigationActionsTaskCommandError = async (output, context) => {
5797
5797
  const parsedOutput = {
5798
5798
  ...output,
5799
- body: await parseBody(output.body, context),
5799
+ body: await parseErrorBody(output.body, context),
5800
5800
  };
5801
5801
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5802
5802
  switch (errorCode) {
@@ -5836,7 +5836,7 @@ exports.deserializeAws_restJson1CancelAuditTaskCommand = deserializeAws_restJson
5836
5836
  const deserializeAws_restJson1CancelAuditTaskCommandError = async (output, context) => {
5837
5837
  const parsedOutput = {
5838
5838
  ...output,
5839
- body: await parseBody(output.body, context),
5839
+ body: await parseErrorBody(output.body, context),
5840
5840
  };
5841
5841
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5842
5842
  switch (errorCode) {
@@ -5876,7 +5876,7 @@ exports.deserializeAws_restJson1CancelCertificateTransferCommand = deserializeAw
5876
5876
  const deserializeAws_restJson1CancelCertificateTransferCommandError = async (output, context) => {
5877
5877
  const parsedOutput = {
5878
5878
  ...output,
5879
- body: await parseBody(output.body, context),
5879
+ body: await parseErrorBody(output.body, context),
5880
5880
  };
5881
5881
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5882
5882
  switch (errorCode) {
@@ -5925,7 +5925,7 @@ exports.deserializeAws_restJson1CancelDetectMitigationActionsTaskCommand = deser
5925
5925
  const deserializeAws_restJson1CancelDetectMitigationActionsTaskCommandError = async (output, context) => {
5926
5926
  const parsedOutput = {
5927
5927
  ...output,
5928
- body: await parseBody(output.body, context),
5928
+ body: await parseErrorBody(output.body, context),
5929
5929
  };
5930
5930
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5931
5931
  switch (errorCode) {
@@ -5974,7 +5974,7 @@ exports.deserializeAws_restJson1CancelJobCommand = deserializeAws_restJson1Cance
5974
5974
  const deserializeAws_restJson1CancelJobCommandError = async (output, context) => {
5975
5975
  const parsedOutput = {
5976
5976
  ...output,
5977
- body: await parseBody(output.body, context),
5977
+ body: await parseErrorBody(output.body, context),
5978
5978
  };
5979
5979
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5980
5980
  switch (errorCode) {
@@ -6017,7 +6017,7 @@ exports.deserializeAws_restJson1CancelJobExecutionCommand = deserializeAws_restJ
6017
6017
  const deserializeAws_restJson1CancelJobExecutionCommandError = async (output, context) => {
6018
6018
  const parsedOutput = {
6019
6019
  ...output,
6020
- body: await parseBody(output.body, context),
6020
+ body: await parseErrorBody(output.body, context),
6021
6021
  };
6022
6022
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6023
6023
  switch (errorCode) {
@@ -6063,7 +6063,7 @@ exports.deserializeAws_restJson1ClearDefaultAuthorizerCommand = deserializeAws_r
6063
6063
  const deserializeAws_restJson1ClearDefaultAuthorizerCommandError = async (output, context) => {
6064
6064
  const parsedOutput = {
6065
6065
  ...output,
6066
- body: await parseBody(output.body, context),
6066
+ body: await parseErrorBody(output.body, context),
6067
6067
  };
6068
6068
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6069
6069
  switch (errorCode) {
@@ -6109,7 +6109,7 @@ exports.deserializeAws_restJson1ConfirmTopicRuleDestinationCommand = deserialize
6109
6109
  const deserializeAws_restJson1ConfirmTopicRuleDestinationCommandError = async (output, context) => {
6110
6110
  const parsedOutput = {
6111
6111
  ...output,
6112
- body: await parseBody(output.body, context),
6112
+ body: await parseErrorBody(output.body, context),
6113
6113
  };
6114
6114
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6115
6115
  switch (errorCode) {
@@ -6152,7 +6152,7 @@ exports.deserializeAws_restJson1CreateAuditSuppressionCommand = deserializeAws_r
6152
6152
  const deserializeAws_restJson1CreateAuditSuppressionCommandError = async (output, context) => {
6153
6153
  const parsedOutput = {
6154
6154
  ...output,
6155
- body: await parseBody(output.body, context),
6155
+ body: await parseErrorBody(output.body, context),
6156
6156
  };
6157
6157
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6158
6158
  switch (errorCode) {
@@ -6201,7 +6201,7 @@ exports.deserializeAws_restJson1CreateAuthorizerCommand = deserializeAws_restJso
6201
6201
  const deserializeAws_restJson1CreateAuthorizerCommandError = async (output, context) => {
6202
6202
  const parsedOutput = {
6203
6203
  ...output,
6204
- body: await parseBody(output.body, context),
6204
+ body: await parseErrorBody(output.body, context),
6205
6205
  };
6206
6206
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6207
6207
  switch (errorCode) {
@@ -6259,7 +6259,7 @@ exports.deserializeAws_restJson1CreateBillingGroupCommand = deserializeAws_restJ
6259
6259
  const deserializeAws_restJson1CreateBillingGroupCommandError = async (output, context) => {
6260
6260
  const parsedOutput = {
6261
6261
  ...output,
6262
- body: await parseBody(output.body, context),
6262
+ body: await parseErrorBody(output.body, context),
6263
6263
  };
6264
6264
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6265
6265
  switch (errorCode) {
@@ -6308,7 +6308,7 @@ exports.deserializeAws_restJson1CreateCertificateFromCsrCommand = deserializeAws
6308
6308
  const deserializeAws_restJson1CreateCertificateFromCsrCommandError = async (output, context) => {
6309
6309
  const parsedOutput = {
6310
6310
  ...output,
6311
- body: await parseBody(output.body, context),
6311
+ body: await parseErrorBody(output.body, context),
6312
6312
  };
6313
6313
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6314
6314
  switch (errorCode) {
@@ -6357,7 +6357,7 @@ exports.deserializeAws_restJson1CreateCustomMetricCommand = deserializeAws_restJ
6357
6357
  const deserializeAws_restJson1CreateCustomMetricCommandError = async (output, context) => {
6358
6358
  const parsedOutput = {
6359
6359
  ...output,
6360
- body: await parseBody(output.body, context),
6360
+ body: await parseErrorBody(output.body, context),
6361
6361
  };
6362
6362
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6363
6363
  switch (errorCode) {
@@ -6406,7 +6406,7 @@ exports.deserializeAws_restJson1CreateDimensionCommand = deserializeAws_restJson
6406
6406
  const deserializeAws_restJson1CreateDimensionCommandError = async (output, context) => {
6407
6407
  const parsedOutput = {
6408
6408
  ...output,
6409
- body: await parseBody(output.body, context),
6409
+ body: await parseErrorBody(output.body, context),
6410
6410
  };
6411
6411
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6412
6412
  switch (errorCode) {
@@ -6455,7 +6455,7 @@ exports.deserializeAws_restJson1CreateDomainConfigurationCommand = deserializeAw
6455
6455
  const deserializeAws_restJson1CreateDomainConfigurationCommandError = async (output, context) => {
6456
6456
  const parsedOutput = {
6457
6457
  ...output,
6458
- body: await parseBody(output.body, context),
6458
+ body: await parseErrorBody(output.body, context),
6459
6459
  };
6460
6460
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6461
6461
  switch (errorCode) {
@@ -6525,7 +6525,7 @@ exports.deserializeAws_restJson1CreateDynamicThingGroupCommand = deserializeAws_
6525
6525
  const deserializeAws_restJson1CreateDynamicThingGroupCommandError = async (output, context) => {
6526
6526
  const parsedOutput = {
6527
6527
  ...output,
6528
- body: await parseBody(output.body, context),
6528
+ body: await parseErrorBody(output.body, context),
6529
6529
  };
6530
6530
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6531
6531
  switch (errorCode) {
@@ -6580,7 +6580,7 @@ exports.deserializeAws_restJson1CreateFleetMetricCommand = deserializeAws_restJs
6580
6580
  const deserializeAws_restJson1CreateFleetMetricCommandError = async (output, context) => {
6581
6581
  const parsedOutput = {
6582
6582
  ...output,
6583
- body: await parseBody(output.body, context),
6583
+ body: await parseErrorBody(output.body, context),
6584
6584
  };
6585
6585
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6586
6586
  switch (errorCode) {
@@ -6650,7 +6650,7 @@ exports.deserializeAws_restJson1CreateJobCommand = deserializeAws_restJson1Creat
6650
6650
  const deserializeAws_restJson1CreateJobCommandError = async (output, context) => {
6651
6651
  const parsedOutput = {
6652
6652
  ...output,
6653
- body: await parseBody(output.body, context),
6653
+ body: await parseErrorBody(output.body, context),
6654
6654
  };
6655
6655
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6656
6656
  switch (errorCode) {
@@ -6702,7 +6702,7 @@ exports.deserializeAws_restJson1CreateJobTemplateCommand = deserializeAws_restJs
6702
6702
  const deserializeAws_restJson1CreateJobTemplateCommandError = async (output, context) => {
6703
6703
  const parsedOutput = {
6704
6704
  ...output,
6705
- body: await parseBody(output.body, context),
6705
+ body: await parseErrorBody(output.body, context),
6706
6706
  };
6707
6707
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6708
6708
  switch (errorCode) {
@@ -6760,7 +6760,7 @@ exports.deserializeAws_restJson1CreateKeysAndCertificateCommand = deserializeAws
6760
6760
  const deserializeAws_restJson1CreateKeysAndCertificateCommandError = async (output, context) => {
6761
6761
  const parsedOutput = {
6762
6762
  ...output,
6763
- body: await parseBody(output.body, context),
6763
+ body: await parseErrorBody(output.body, context),
6764
6764
  };
6765
6765
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6766
6766
  switch (errorCode) {
@@ -6809,7 +6809,7 @@ exports.deserializeAws_restJson1CreateMitigationActionCommand = deserializeAws_r
6809
6809
  const deserializeAws_restJson1CreateMitigationActionCommandError = async (output, context) => {
6810
6810
  const parsedOutput = {
6811
6811
  ...output,
6812
- body: await parseBody(output.body, context),
6812
+ body: await parseErrorBody(output.body, context),
6813
6813
  };
6814
6814
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6815
6815
  switch (errorCode) {
@@ -6867,7 +6867,7 @@ exports.deserializeAws_restJson1CreateOTAUpdateCommand = deserializeAws_restJson
6867
6867
  const deserializeAws_restJson1CreateOTAUpdateCommandError = async (output, context) => {
6868
6868
  const parsedOutput = {
6869
6869
  ...output,
6870
- body: await parseBody(output.body, context),
6870
+ body: await parseErrorBody(output.body, context),
6871
6871
  };
6872
6872
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6873
6873
  switch (errorCode) {
@@ -6931,7 +6931,7 @@ exports.deserializeAws_restJson1CreatePolicyCommand = deserializeAws_restJson1Cr
6931
6931
  const deserializeAws_restJson1CreatePolicyCommandError = async (output, context) => {
6932
6932
  const parsedOutput = {
6933
6933
  ...output,
6934
- body: await parseBody(output.body, context),
6934
+ body: await parseErrorBody(output.body, context),
6935
6935
  };
6936
6936
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6937
6937
  switch (errorCode) {
@@ -6992,7 +6992,7 @@ exports.deserializeAws_restJson1CreatePolicyVersionCommand = deserializeAws_rest
6992
6992
  const deserializeAws_restJson1CreatePolicyVersionCommandError = async (output, context) => {
6993
6993
  const parsedOutput = {
6994
6994
  ...output,
6995
- body: await parseBody(output.body, context),
6995
+ body: await parseErrorBody(output.body, context),
6996
6996
  };
6997
6997
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6998
6998
  switch (errorCode) {
@@ -7056,7 +7056,7 @@ exports.deserializeAws_restJson1CreateProvisioningClaimCommand = deserializeAws_
7056
7056
  const deserializeAws_restJson1CreateProvisioningClaimCommandError = async (output, context) => {
7057
7057
  const parsedOutput = {
7058
7058
  ...output,
7059
- body: await parseBody(output.body, context),
7059
+ body: await parseErrorBody(output.body, context),
7060
7060
  };
7061
7061
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7062
7062
  switch (errorCode) {
@@ -7111,7 +7111,7 @@ exports.deserializeAws_restJson1CreateProvisioningTemplateCommand = deserializeA
7111
7111
  const deserializeAws_restJson1CreateProvisioningTemplateCommandError = async (output, context) => {
7112
7112
  const parsedOutput = {
7113
7113
  ...output,
7114
- body: await parseBody(output.body, context),
7114
+ body: await parseErrorBody(output.body, context),
7115
7115
  };
7116
7116
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7117
7117
  switch (errorCode) {
@@ -7169,7 +7169,7 @@ exports.deserializeAws_restJson1CreateProvisioningTemplateVersionCommand = deser
7169
7169
  const deserializeAws_restJson1CreateProvisioningTemplateVersionCommandError = async (output, context) => {
7170
7170
  const parsedOutput = {
7171
7171
  ...output,
7172
- body: await parseBody(output.body, context),
7172
+ body: await parseErrorBody(output.body, context),
7173
7173
  };
7174
7174
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7175
7175
  switch (errorCode) {
@@ -7224,7 +7224,7 @@ exports.deserializeAws_restJson1CreateRoleAliasCommand = deserializeAws_restJson
7224
7224
  const deserializeAws_restJson1CreateRoleAliasCommandError = async (output, context) => {
7225
7225
  const parsedOutput = {
7226
7226
  ...output,
7227
- body: await parseBody(output.body, context),
7227
+ body: await parseErrorBody(output.body, context),
7228
7228
  };
7229
7229
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7230
7230
  switch (errorCode) {
@@ -7276,7 +7276,7 @@ exports.deserializeAws_restJson1CreateScheduledAuditCommand = deserializeAws_res
7276
7276
  const deserializeAws_restJson1CreateScheduledAuditCommandError = async (output, context) => {
7277
7277
  const parsedOutput = {
7278
7278
  ...output,
7279
- body: await parseBody(output.body, context),
7279
+ body: await parseErrorBody(output.body, context),
7280
7280
  };
7281
7281
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7282
7282
  switch (errorCode) {
@@ -7325,7 +7325,7 @@ exports.deserializeAws_restJson1CreateSecurityProfileCommand = deserializeAws_re
7325
7325
  const deserializeAws_restJson1CreateSecurityProfileCommandError = async (output, context) => {
7326
7326
  const parsedOutput = {
7327
7327
  ...output,
7328
- body: await parseBody(output.body, context),
7328
+ body: await parseErrorBody(output.body, context),
7329
7329
  };
7330
7330
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7331
7331
  switch (errorCode) {
@@ -7377,7 +7377,7 @@ exports.deserializeAws_restJson1CreateStreamCommand = deserializeAws_restJson1Cr
7377
7377
  const deserializeAws_restJson1CreateStreamCommandError = async (output, context) => {
7378
7378
  const parsedOutput = {
7379
7379
  ...output,
7380
- body: await parseBody(output.body, context),
7380
+ body: await parseErrorBody(output.body, context),
7381
7381
  };
7382
7382
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7383
7383
  switch (errorCode) {
@@ -7438,7 +7438,7 @@ exports.deserializeAws_restJson1CreateThingCommand = deserializeAws_restJson1Cre
7438
7438
  const deserializeAws_restJson1CreateThingCommandError = async (output, context) => {
7439
7439
  const parsedOutput = {
7440
7440
  ...output,
7441
- body: await parseBody(output.body, context),
7441
+ body: await parseErrorBody(output.body, context),
7442
7442
  };
7443
7443
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7444
7444
  switch (errorCode) {
@@ -7496,7 +7496,7 @@ exports.deserializeAws_restJson1CreateThingGroupCommand = deserializeAws_restJso
7496
7496
  const deserializeAws_restJson1CreateThingGroupCommandError = async (output, context) => {
7497
7497
  const parsedOutput = {
7498
7498
  ...output,
7499
- body: await parseBody(output.body, context),
7499
+ body: await parseErrorBody(output.body, context),
7500
7500
  };
7501
7501
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7502
7502
  switch (errorCode) {
@@ -7545,7 +7545,7 @@ exports.deserializeAws_restJson1CreateThingTypeCommand = deserializeAws_restJson
7545
7545
  const deserializeAws_restJson1CreateThingTypeCommandError = async (output, context) => {
7546
7546
  const parsedOutput = {
7547
7547
  ...output,
7548
- body: await parseBody(output.body, context),
7548
+ body: await parseErrorBody(output.body, context),
7549
7549
  };
7550
7550
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7551
7551
  switch (errorCode) {
@@ -7591,7 +7591,7 @@ exports.deserializeAws_restJson1CreateTopicRuleCommand = deserializeAws_restJson
7591
7591
  const deserializeAws_restJson1CreateTopicRuleCommandError = async (output, context) => {
7592
7592
  const parsedOutput = {
7593
7593
  ...output,
7594
- body: await parseBody(output.body, context),
7594
+ body: await parseErrorBody(output.body, context),
7595
7595
  };
7596
7596
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7597
7597
  switch (errorCode) {
@@ -7640,7 +7640,7 @@ exports.deserializeAws_restJson1CreateTopicRuleDestinationCommand = deserializeA
7640
7640
  const deserializeAws_restJson1CreateTopicRuleDestinationCommandError = async (output, context) => {
7641
7641
  const parsedOutput = {
7642
7642
  ...output,
7643
- body: await parseBody(output.body, context),
7643
+ body: await parseErrorBody(output.body, context),
7644
7644
  };
7645
7645
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7646
7646
  switch (errorCode) {
@@ -7683,7 +7683,7 @@ exports.deserializeAws_restJson1DeleteAccountAuditConfigurationCommand = deseria
7683
7683
  const deserializeAws_restJson1DeleteAccountAuditConfigurationCommandError = async (output, context) => {
7684
7684
  const parsedOutput = {
7685
7685
  ...output,
7686
- body: await parseBody(output.body, context),
7686
+ body: await parseErrorBody(output.body, context),
7687
7687
  };
7688
7688
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7689
7689
  switch (errorCode) {
@@ -7723,7 +7723,7 @@ exports.deserializeAws_restJson1DeleteAuditSuppressionCommand = deserializeAws_r
7723
7723
  const deserializeAws_restJson1DeleteAuditSuppressionCommandError = async (output, context) => {
7724
7724
  const parsedOutput = {
7725
7725
  ...output,
7726
- body: await parseBody(output.body, context),
7726
+ body: await parseErrorBody(output.body, context),
7727
7727
  };
7728
7728
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7729
7729
  switch (errorCode) {
@@ -7760,7 +7760,7 @@ exports.deserializeAws_restJson1DeleteAuthorizerCommand = deserializeAws_restJso
7760
7760
  const deserializeAws_restJson1DeleteAuthorizerCommandError = async (output, context) => {
7761
7761
  const parsedOutput = {
7762
7762
  ...output,
7763
- body: await parseBody(output.body, context),
7763
+ body: await parseErrorBody(output.body, context),
7764
7764
  };
7765
7765
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7766
7766
  switch (errorCode) {
@@ -7809,7 +7809,7 @@ exports.deserializeAws_restJson1DeleteBillingGroupCommand = deserializeAws_restJ
7809
7809
  const deserializeAws_restJson1DeleteBillingGroupCommandError = async (output, context) => {
7810
7810
  const parsedOutput = {
7811
7811
  ...output,
7812
- body: await parseBody(output.body, context),
7812
+ body: await parseErrorBody(output.body, context),
7813
7813
  };
7814
7814
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7815
7815
  switch (errorCode) {
@@ -7849,7 +7849,7 @@ exports.deserializeAws_restJson1DeleteCACertificateCommand = deserializeAws_rest
7849
7849
  const deserializeAws_restJson1DeleteCACertificateCommandError = async (output, context) => {
7850
7850
  const parsedOutput = {
7851
7851
  ...output,
7852
- body: await parseBody(output.body, context),
7852
+ body: await parseErrorBody(output.body, context),
7853
7853
  };
7854
7854
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7855
7855
  switch (errorCode) {
@@ -7898,7 +7898,7 @@ exports.deserializeAws_restJson1DeleteCertificateCommand = deserializeAws_restJs
7898
7898
  const deserializeAws_restJson1DeleteCertificateCommandError = async (output, context) => {
7899
7899
  const parsedOutput = {
7900
7900
  ...output,
7901
- body: await parseBody(output.body, context),
7901
+ body: await parseErrorBody(output.body, context),
7902
7902
  };
7903
7903
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7904
7904
  switch (errorCode) {
@@ -7950,7 +7950,7 @@ exports.deserializeAws_restJson1DeleteCustomMetricCommand = deserializeAws_restJ
7950
7950
  const deserializeAws_restJson1DeleteCustomMetricCommandError = async (output, context) => {
7951
7951
  const parsedOutput = {
7952
7952
  ...output,
7953
- body: await parseBody(output.body, context),
7953
+ body: await parseErrorBody(output.body, context),
7954
7954
  };
7955
7955
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7956
7956
  switch (errorCode) {
@@ -7987,7 +7987,7 @@ exports.deserializeAws_restJson1DeleteDimensionCommand = deserializeAws_restJson
7987
7987
  const deserializeAws_restJson1DeleteDimensionCommandError = async (output, context) => {
7988
7988
  const parsedOutput = {
7989
7989
  ...output,
7990
- body: await parseBody(output.body, context),
7990
+ body: await parseErrorBody(output.body, context),
7991
7991
  };
7992
7992
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7993
7993
  switch (errorCode) {
@@ -8024,7 +8024,7 @@ exports.deserializeAws_restJson1DeleteDomainConfigurationCommand = deserializeAw
8024
8024
  const deserializeAws_restJson1DeleteDomainConfigurationCommandError = async (output, context) => {
8025
8025
  const parsedOutput = {
8026
8026
  ...output,
8027
- body: await parseBody(output.body, context),
8027
+ body: await parseErrorBody(output.body, context),
8028
8028
  };
8029
8029
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8030
8030
  switch (errorCode) {
@@ -8070,7 +8070,7 @@ exports.deserializeAws_restJson1DeleteDynamicThingGroupCommand = deserializeAws_
8070
8070
  const deserializeAws_restJson1DeleteDynamicThingGroupCommandError = async (output, context) => {
8071
8071
  const parsedOutput = {
8072
8072
  ...output,
8073
- body: await parseBody(output.body, context),
8073
+ body: await parseErrorBody(output.body, context),
8074
8074
  };
8075
8075
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8076
8076
  switch (errorCode) {
@@ -8110,7 +8110,7 @@ exports.deserializeAws_restJson1DeleteFleetMetricCommand = deserializeAws_restJs
8110
8110
  const deserializeAws_restJson1DeleteFleetMetricCommandError = async (output, context) => {
8111
8111
  const parsedOutput = {
8112
8112
  ...output,
8113
- body: await parseBody(output.body, context),
8113
+ body: await parseErrorBody(output.body, context),
8114
8114
  };
8115
8115
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8116
8116
  switch (errorCode) {
@@ -8156,7 +8156,7 @@ exports.deserializeAws_restJson1DeleteJobCommand = deserializeAws_restJson1Delet
8156
8156
  const deserializeAws_restJson1DeleteJobCommandError = async (output, context) => {
8157
8157
  const parsedOutput = {
8158
8158
  ...output,
8159
- body: await parseBody(output.body, context),
8159
+ body: await parseErrorBody(output.body, context),
8160
8160
  };
8161
8161
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8162
8162
  switch (errorCode) {
@@ -8202,7 +8202,7 @@ exports.deserializeAws_restJson1DeleteJobExecutionCommand = deserializeAws_restJ
8202
8202
  const deserializeAws_restJson1DeleteJobExecutionCommandError = async (output, context) => {
8203
8203
  const parsedOutput = {
8204
8204
  ...output,
8205
- body: await parseBody(output.body, context),
8205
+ body: await parseErrorBody(output.body, context),
8206
8206
  };
8207
8207
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8208
8208
  switch (errorCode) {
@@ -8245,7 +8245,7 @@ exports.deserializeAws_restJson1DeleteJobTemplateCommand = deserializeAws_restJs
8245
8245
  const deserializeAws_restJson1DeleteJobTemplateCommandError = async (output, context) => {
8246
8246
  const parsedOutput = {
8247
8247
  ...output,
8248
- body: await parseBody(output.body, context),
8248
+ body: await parseErrorBody(output.body, context),
8249
8249
  };
8250
8250
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8251
8251
  switch (errorCode) {
@@ -8285,7 +8285,7 @@ exports.deserializeAws_restJson1DeleteMitigationActionCommand = deserializeAws_r
8285
8285
  const deserializeAws_restJson1DeleteMitigationActionCommandError = async (output, context) => {
8286
8286
  const parsedOutput = {
8287
8287
  ...output,
8288
- body: await parseBody(output.body, context),
8288
+ body: await parseErrorBody(output.body, context),
8289
8289
  };
8290
8290
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8291
8291
  switch (errorCode) {
@@ -8322,7 +8322,7 @@ exports.deserializeAws_restJson1DeleteOTAUpdateCommand = deserializeAws_restJson
8322
8322
  const deserializeAws_restJson1DeleteOTAUpdateCommandError = async (output, context) => {
8323
8323
  const parsedOutput = {
8324
8324
  ...output,
8325
- body: await parseBody(output.body, context),
8325
+ body: await parseErrorBody(output.body, context),
8326
8326
  };
8327
8327
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8328
8328
  switch (errorCode) {
@@ -8371,7 +8371,7 @@ exports.deserializeAws_restJson1DeletePolicyCommand = deserializeAws_restJson1De
8371
8371
  const deserializeAws_restJson1DeletePolicyCommandError = async (output, context) => {
8372
8372
  const parsedOutput = {
8373
8373
  ...output,
8374
- body: await parseBody(output.body, context),
8374
+ body: await parseErrorBody(output.body, context),
8375
8375
  };
8376
8376
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8377
8377
  switch (errorCode) {
@@ -8420,7 +8420,7 @@ exports.deserializeAws_restJson1DeletePolicyVersionCommand = deserializeAws_rest
8420
8420
  const deserializeAws_restJson1DeletePolicyVersionCommandError = async (output, context) => {
8421
8421
  const parsedOutput = {
8422
8422
  ...output,
8423
- body: await parseBody(output.body, context),
8423
+ body: await parseErrorBody(output.body, context),
8424
8424
  };
8425
8425
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8426
8426
  switch (errorCode) {
@@ -8469,7 +8469,7 @@ exports.deserializeAws_restJson1DeleteProvisioningTemplateCommand = deserializeA
8469
8469
  const deserializeAws_restJson1DeleteProvisioningTemplateCommandError = async (output, context) => {
8470
8470
  const parsedOutput = {
8471
8471
  ...output,
8472
- body: await parseBody(output.body, context),
8472
+ body: await parseErrorBody(output.body, context),
8473
8473
  };
8474
8474
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8475
8475
  switch (errorCode) {
@@ -8518,7 +8518,7 @@ exports.deserializeAws_restJson1DeleteProvisioningTemplateVersionCommand = deser
8518
8518
  const deserializeAws_restJson1DeleteProvisioningTemplateVersionCommandError = async (output, context) => {
8519
8519
  const parsedOutput = {
8520
8520
  ...output,
8521
- body: await parseBody(output.body, context),
8521
+ body: await parseErrorBody(output.body, context),
8522
8522
  };
8523
8523
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8524
8524
  switch (errorCode) {
@@ -8567,7 +8567,7 @@ exports.deserializeAws_restJson1DeleteRegistrationCodeCommand = deserializeAws_r
8567
8567
  const deserializeAws_restJson1DeleteRegistrationCodeCommandError = async (output, context) => {
8568
8568
  const parsedOutput = {
8569
8569
  ...output,
8570
- body: await parseBody(output.body, context),
8570
+ body: await parseErrorBody(output.body, context),
8571
8571
  };
8572
8572
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8573
8573
  switch (errorCode) {
@@ -8610,7 +8610,7 @@ exports.deserializeAws_restJson1DeleteRoleAliasCommand = deserializeAws_restJson
8610
8610
  const deserializeAws_restJson1DeleteRoleAliasCommandError = async (output, context) => {
8611
8611
  const parsedOutput = {
8612
8612
  ...output,
8613
- body: await parseBody(output.body, context),
8613
+ body: await parseErrorBody(output.body, context),
8614
8614
  };
8615
8615
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8616
8616
  switch (errorCode) {
@@ -8659,7 +8659,7 @@ exports.deserializeAws_restJson1DeleteScheduledAuditCommand = deserializeAws_res
8659
8659
  const deserializeAws_restJson1DeleteScheduledAuditCommandError = async (output, context) => {
8660
8660
  const parsedOutput = {
8661
8661
  ...output,
8662
- body: await parseBody(output.body, context),
8662
+ body: await parseErrorBody(output.body, context),
8663
8663
  };
8664
8664
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8665
8665
  switch (errorCode) {
@@ -8699,7 +8699,7 @@ exports.deserializeAws_restJson1DeleteSecurityProfileCommand = deserializeAws_re
8699
8699
  const deserializeAws_restJson1DeleteSecurityProfileCommandError = async (output, context) => {
8700
8700
  const parsedOutput = {
8701
8701
  ...output,
8702
- body: await parseBody(output.body, context),
8702
+ body: await parseErrorBody(output.body, context),
8703
8703
  };
8704
8704
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8705
8705
  switch (errorCode) {
@@ -8739,7 +8739,7 @@ exports.deserializeAws_restJson1DeleteStreamCommand = deserializeAws_restJson1De
8739
8739
  const deserializeAws_restJson1DeleteStreamCommandError = async (output, context) => {
8740
8740
  const parsedOutput = {
8741
8741
  ...output,
8742
- body: await parseBody(output.body, context),
8742
+ body: await parseErrorBody(output.body, context),
8743
8743
  };
8744
8744
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8745
8745
  switch (errorCode) {
@@ -8788,7 +8788,7 @@ exports.deserializeAws_restJson1DeleteThingCommand = deserializeAws_restJson1Del
8788
8788
  const deserializeAws_restJson1DeleteThingCommandError = async (output, context) => {
8789
8789
  const parsedOutput = {
8790
8790
  ...output,
8791
- body: await parseBody(output.body, context),
8791
+ body: await parseErrorBody(output.body, context),
8792
8792
  };
8793
8793
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8794
8794
  switch (errorCode) {
@@ -8837,7 +8837,7 @@ exports.deserializeAws_restJson1DeleteThingGroupCommand = deserializeAws_restJso
8837
8837
  const deserializeAws_restJson1DeleteThingGroupCommandError = async (output, context) => {
8838
8838
  const parsedOutput = {
8839
8839
  ...output,
8840
- body: await parseBody(output.body, context),
8840
+ body: await parseErrorBody(output.body, context),
8841
8841
  };
8842
8842
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8843
8843
  switch (errorCode) {
@@ -8877,7 +8877,7 @@ exports.deserializeAws_restJson1DeleteThingTypeCommand = deserializeAws_restJson
8877
8877
  const deserializeAws_restJson1DeleteThingTypeCommandError = async (output, context) => {
8878
8878
  const parsedOutput = {
8879
8879
  ...output,
8880
- body: await parseBody(output.body, context),
8880
+ body: await parseErrorBody(output.body, context),
8881
8881
  };
8882
8882
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8883
8883
  switch (errorCode) {
@@ -8923,7 +8923,7 @@ exports.deserializeAws_restJson1DeleteTopicRuleCommand = deserializeAws_restJson
8923
8923
  const deserializeAws_restJson1DeleteTopicRuleCommandError = async (output, context) => {
8924
8924
  const parsedOutput = {
8925
8925
  ...output,
8926
- body: await parseBody(output.body, context),
8926
+ body: await parseErrorBody(output.body, context),
8927
8927
  };
8928
8928
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8929
8929
  switch (errorCode) {
@@ -8966,7 +8966,7 @@ exports.deserializeAws_restJson1DeleteTopicRuleDestinationCommand = deserializeA
8966
8966
  const deserializeAws_restJson1DeleteTopicRuleDestinationCommandError = async (output, context) => {
8967
8967
  const parsedOutput = {
8968
8968
  ...output,
8969
- body: await parseBody(output.body, context),
8969
+ body: await parseErrorBody(output.body, context),
8970
8970
  };
8971
8971
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8972
8972
  switch (errorCode) {
@@ -9009,7 +9009,7 @@ exports.deserializeAws_restJson1DeleteV2LoggingLevelCommand = deserializeAws_res
9009
9009
  const deserializeAws_restJson1DeleteV2LoggingLevelCommandError = async (output, context) => {
9010
9010
  const parsedOutput = {
9011
9011
  ...output,
9012
- body: await parseBody(output.body, context),
9012
+ body: await parseErrorBody(output.body, context),
9013
9013
  };
9014
9014
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9015
9015
  switch (errorCode) {
@@ -9046,7 +9046,7 @@ exports.deserializeAws_restJson1DeprecateThingTypeCommand = deserializeAws_restJ
9046
9046
  const deserializeAws_restJson1DeprecateThingTypeCommandError = async (output, context) => {
9047
9047
  const parsedOutput = {
9048
9048
  ...output,
9049
- body: await parseBody(output.body, context),
9049
+ body: await parseErrorBody(output.body, context),
9050
9050
  };
9051
9051
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9052
9052
  switch (errorCode) {
@@ -9101,7 +9101,7 @@ exports.deserializeAws_restJson1DescribeAccountAuditConfigurationCommand = deser
9101
9101
  const deserializeAws_restJson1DescribeAccountAuditConfigurationCommandError = async (output, context) => {
9102
9102
  const parsedOutput = {
9103
9103
  ...output,
9104
- body: await parseBody(output.body, context),
9104
+ body: await parseErrorBody(output.body, context),
9105
9105
  };
9106
9106
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9107
9107
  switch (errorCode) {
@@ -9138,7 +9138,7 @@ exports.deserializeAws_restJson1DescribeAuditFindingCommand = deserializeAws_res
9138
9138
  const deserializeAws_restJson1DescribeAuditFindingCommandError = async (output, context) => {
9139
9139
  const parsedOutput = {
9140
9140
  ...output,
9141
- body: await parseBody(output.body, context),
9141
+ body: await parseErrorBody(output.body, context),
9142
9142
  };
9143
9143
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9144
9144
  switch (errorCode) {
@@ -9199,7 +9199,7 @@ exports.deserializeAws_restJson1DescribeAuditMitigationActionsTaskCommand = dese
9199
9199
  const deserializeAws_restJson1DescribeAuditMitigationActionsTaskCommandError = async (output, context) => {
9200
9200
  const parsedOutput = {
9201
9201
  ...output,
9202
- body: await parseBody(output.body, context),
9202
+ body: await parseErrorBody(output.body, context),
9203
9203
  };
9204
9204
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9205
9205
  switch (errorCode) {
@@ -9254,7 +9254,7 @@ exports.deserializeAws_restJson1DescribeAuditSuppressionCommand = deserializeAws
9254
9254
  const deserializeAws_restJson1DescribeAuditSuppressionCommandError = async (output, context) => {
9255
9255
  const parsedOutput = {
9256
9256
  ...output,
9257
- body: await parseBody(output.body, context),
9257
+ body: await parseErrorBody(output.body, context),
9258
9258
  };
9259
9259
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9260
9260
  switch (errorCode) {
@@ -9312,7 +9312,7 @@ exports.deserializeAws_restJson1DescribeAuditTaskCommand = deserializeAws_restJs
9312
9312
  const deserializeAws_restJson1DescribeAuditTaskCommandError = async (output, context) => {
9313
9313
  const parsedOutput = {
9314
9314
  ...output,
9315
- body: await parseBody(output.body, context),
9315
+ body: await parseErrorBody(output.body, context),
9316
9316
  };
9317
9317
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9318
9318
  switch (errorCode) {
@@ -9355,7 +9355,7 @@ exports.deserializeAws_restJson1DescribeAuthorizerCommand = deserializeAws_restJ
9355
9355
  const deserializeAws_restJson1DescribeAuthorizerCommandError = async (output, context) => {
9356
9356
  const parsedOutput = {
9357
9357
  ...output,
9358
- body: await parseBody(output.body, context),
9358
+ body: await parseErrorBody(output.body, context),
9359
9359
  };
9360
9360
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9361
9361
  switch (errorCode) {
@@ -9419,7 +9419,7 @@ exports.deserializeAws_restJson1DescribeBillingGroupCommand = deserializeAws_res
9419
9419
  const deserializeAws_restJson1DescribeBillingGroupCommandError = async (output, context) => {
9420
9420
  const parsedOutput = {
9421
9421
  ...output,
9422
- body: await parseBody(output.body, context),
9422
+ body: await parseErrorBody(output.body, context),
9423
9423
  };
9424
9424
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9425
9425
  switch (errorCode) {
@@ -9465,7 +9465,7 @@ exports.deserializeAws_restJson1DescribeCACertificateCommand = deserializeAws_re
9465
9465
  const deserializeAws_restJson1DescribeCACertificateCommandError = async (output, context) => {
9466
9466
  const parsedOutput = {
9467
9467
  ...output,
9468
- body: await parseBody(output.body, context),
9468
+ body: await parseErrorBody(output.body, context),
9469
9469
  };
9470
9470
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9471
9471
  switch (errorCode) {
@@ -9514,7 +9514,7 @@ exports.deserializeAws_restJson1DescribeCertificateCommand = deserializeAws_rest
9514
9514
  const deserializeAws_restJson1DescribeCertificateCommandError = async (output, context) => {
9515
9515
  const parsedOutput = {
9516
9516
  ...output,
9517
- body: await parseBody(output.body, context),
9517
+ body: await parseErrorBody(output.body, context),
9518
9518
  };
9519
9519
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9520
9520
  switch (errorCode) {
@@ -9578,7 +9578,7 @@ exports.deserializeAws_restJson1DescribeCustomMetricCommand = deserializeAws_res
9578
9578
  const deserializeAws_restJson1DescribeCustomMetricCommandError = async (output, context) => {
9579
9579
  const parsedOutput = {
9580
9580
  ...output,
9581
- body: await parseBody(output.body, context),
9581
+ body: await parseErrorBody(output.body, context),
9582
9582
  };
9583
9583
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9584
9584
  switch (errorCode) {
@@ -9621,7 +9621,7 @@ exports.deserializeAws_restJson1DescribeDefaultAuthorizerCommand = deserializeAw
9621
9621
  const deserializeAws_restJson1DescribeDefaultAuthorizerCommandError = async (output, context) => {
9622
9622
  const parsedOutput = {
9623
9623
  ...output,
9624
- body: await parseBody(output.body, context),
9624
+ body: await parseErrorBody(output.body, context),
9625
9625
  };
9626
9626
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9627
9627
  switch (errorCode) {
@@ -9670,7 +9670,7 @@ exports.deserializeAws_restJson1DescribeDetectMitigationActionsTaskCommand = des
9670
9670
  const deserializeAws_restJson1DescribeDetectMitigationActionsTaskCommandError = async (output, context) => {
9671
9671
  const parsedOutput = {
9672
9672
  ...output,
9673
- body: await parseBody(output.body, context),
9673
+ body: await parseErrorBody(output.body, context),
9674
9674
  };
9675
9675
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9676
9676
  switch (errorCode) {
@@ -9728,7 +9728,7 @@ exports.deserializeAws_restJson1DescribeDimensionCommand = deserializeAws_restJs
9728
9728
  const deserializeAws_restJson1DescribeDimensionCommandError = async (output, context) => {
9729
9729
  const parsedOutput = {
9730
9730
  ...output,
9731
- body: await parseBody(output.body, context),
9731
+ body: await parseErrorBody(output.body, context),
9732
9732
  };
9733
9733
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9734
9734
  switch (errorCode) {
@@ -9795,7 +9795,7 @@ exports.deserializeAws_restJson1DescribeDomainConfigurationCommand = deserialize
9795
9795
  const deserializeAws_restJson1DescribeDomainConfigurationCommandError = async (output, context) => {
9796
9796
  const parsedOutput = {
9797
9797
  ...output,
9798
- body: await parseBody(output.body, context),
9798
+ body: await parseErrorBody(output.body, context),
9799
9799
  };
9800
9800
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9801
9801
  switch (errorCode) {
@@ -9844,7 +9844,7 @@ exports.deserializeAws_restJson1DescribeEndpointCommand = deserializeAws_restJso
9844
9844
  const deserializeAws_restJson1DescribeEndpointCommandError = async (output, context) => {
9845
9845
  const parsedOutput = {
9846
9846
  ...output,
9847
- body: await parseBody(output.body, context),
9847
+ body: await parseErrorBody(output.body, context),
9848
9848
  };
9849
9849
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9850
9850
  switch (errorCode) {
@@ -9893,7 +9893,7 @@ exports.deserializeAws_restJson1DescribeEventConfigurationsCommand = deserialize
9893
9893
  const deserializeAws_restJson1DescribeEventConfigurationsCommandError = async (output, context) => {
9894
9894
  const parsedOutput = {
9895
9895
  ...output,
9896
- body: await parseBody(output.body, context),
9896
+ body: await parseErrorBody(output.body, context),
9897
9897
  };
9898
9898
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9899
9899
  switch (errorCode) {
@@ -9966,7 +9966,7 @@ exports.deserializeAws_restJson1DescribeFleetMetricCommand = deserializeAws_rest
9966
9966
  const deserializeAws_restJson1DescribeFleetMetricCommandError = async (output, context) => {
9967
9967
  const parsedOutput = {
9968
9968
  ...output,
9969
- body: await parseBody(output.body, context),
9969
+ body: await parseErrorBody(output.body, context),
9970
9970
  };
9971
9971
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
9972
9972
  switch (errorCode) {
@@ -10021,7 +10021,7 @@ exports.deserializeAws_restJson1DescribeIndexCommand = deserializeAws_restJson1D
10021
10021
  const deserializeAws_restJson1DescribeIndexCommandError = async (output, context) => {
10022
10022
  const parsedOutput = {
10023
10023
  ...output,
10024
- body: await parseBody(output.body, context),
10024
+ body: await parseErrorBody(output.body, context),
10025
10025
  };
10026
10026
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10027
10027
  switch (errorCode) {
@@ -10073,7 +10073,7 @@ exports.deserializeAws_restJson1DescribeJobCommand = deserializeAws_restJson1Des
10073
10073
  const deserializeAws_restJson1DescribeJobCommandError = async (output, context) => {
10074
10074
  const parsedOutput = {
10075
10075
  ...output,
10076
- body: await parseBody(output.body, context),
10076
+ body: await parseErrorBody(output.body, context),
10077
10077
  };
10078
10078
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10079
10079
  switch (errorCode) {
@@ -10116,7 +10116,7 @@ exports.deserializeAws_restJson1DescribeJobExecutionCommand = deserializeAws_res
10116
10116
  const deserializeAws_restJson1DescribeJobExecutionCommandError = async (output, context) => {
10117
10117
  const parsedOutput = {
10118
10118
  ...output,
10119
- body: await parseBody(output.body, context),
10119
+ body: await parseErrorBody(output.body, context),
10120
10120
  };
10121
10121
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10122
10122
  switch (errorCode) {
@@ -10189,7 +10189,7 @@ exports.deserializeAws_restJson1DescribeJobTemplateCommand = deserializeAws_rest
10189
10189
  const deserializeAws_restJson1DescribeJobTemplateCommandError = async (output, context) => {
10190
10190
  const parsedOutput = {
10191
10191
  ...output,
10192
- body: await parseBody(output.body, context),
10192
+ body: await parseErrorBody(output.body, context),
10193
10193
  };
10194
10194
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10195
10195
  switch (errorCode) {
@@ -10250,7 +10250,7 @@ exports.deserializeAws_restJson1DescribeManagedJobTemplateCommand = deserializeA
10250
10250
  const deserializeAws_restJson1DescribeManagedJobTemplateCommandError = async (output, context) => {
10251
10251
  const parsedOutput = {
10252
10252
  ...output,
10253
- body: await parseBody(output.body, context),
10253
+ body: await parseErrorBody(output.body, context),
10254
10254
  };
10255
10255
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10256
10256
  switch (errorCode) {
@@ -10314,7 +10314,7 @@ exports.deserializeAws_restJson1DescribeMitigationActionCommand = deserializeAws
10314
10314
  const deserializeAws_restJson1DescribeMitigationActionCommandError = async (output, context) => {
10315
10315
  const parsedOutput = {
10316
10316
  ...output,
10317
- body: await parseBody(output.body, context),
10317
+ body: await parseErrorBody(output.body, context),
10318
10318
  };
10319
10319
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10320
10320
  switch (errorCode) {
@@ -10387,7 +10387,7 @@ exports.deserializeAws_restJson1DescribeProvisioningTemplateCommand = deserializ
10387
10387
  const deserializeAws_restJson1DescribeProvisioningTemplateCommandError = async (output, context) => {
10388
10388
  const parsedOutput = {
10389
10389
  ...output,
10390
- body: await parseBody(output.body, context),
10390
+ body: await parseErrorBody(output.body, context),
10391
10391
  };
10392
10392
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10393
10393
  switch (errorCode) {
@@ -10442,7 +10442,7 @@ exports.deserializeAws_restJson1DescribeProvisioningTemplateVersionCommand = des
10442
10442
  const deserializeAws_restJson1DescribeProvisioningTemplateVersionCommandError = async (output, context) => {
10443
10443
  const parsedOutput = {
10444
10444
  ...output,
10445
- body: await parseBody(output.body, context),
10445
+ body: await parseErrorBody(output.body, context),
10446
10446
  };
10447
10447
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10448
10448
  switch (errorCode) {
@@ -10488,7 +10488,7 @@ exports.deserializeAws_restJson1DescribeRoleAliasCommand = deserializeAws_restJs
10488
10488
  const deserializeAws_restJson1DescribeRoleAliasCommandError = async (output, context) => {
10489
10489
  const parsedOutput = {
10490
10490
  ...output,
10491
- body: await parseBody(output.body, context),
10491
+ body: await parseErrorBody(output.body, context),
10492
10492
  };
10493
10493
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10494
10494
  switch (errorCode) {
@@ -10552,7 +10552,7 @@ exports.deserializeAws_restJson1DescribeScheduledAuditCommand = deserializeAws_r
10552
10552
  const deserializeAws_restJson1DescribeScheduledAuditCommandError = async (output, context) => {
10553
10553
  const parsedOutput = {
10554
10554
  ...output,
10555
- body: await parseBody(output.body, context),
10555
+ body: await parseErrorBody(output.body, context),
10556
10556
  };
10557
10557
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10558
10558
  switch (errorCode) {
@@ -10622,7 +10622,7 @@ exports.deserializeAws_restJson1DescribeSecurityProfileCommand = deserializeAws_
10622
10622
  const deserializeAws_restJson1DescribeSecurityProfileCommandError = async (output, context) => {
10623
10623
  const parsedOutput = {
10624
10624
  ...output,
10625
- body: await parseBody(output.body, context),
10625
+ body: await parseErrorBody(output.body, context),
10626
10626
  };
10627
10627
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10628
10628
  switch (errorCode) {
@@ -10665,7 +10665,7 @@ exports.deserializeAws_restJson1DescribeStreamCommand = deserializeAws_restJson1
10665
10665
  const deserializeAws_restJson1DescribeStreamCommandError = async (output, context) => {
10666
10666
  const parsedOutput = {
10667
10667
  ...output,
10668
- body: await parseBody(output.body, context),
10668
+ body: await parseErrorBody(output.body, context),
10669
10669
  };
10670
10670
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10671
10671
  switch (errorCode) {
@@ -10735,7 +10735,7 @@ exports.deserializeAws_restJson1DescribeThingCommand = deserializeAws_restJson1D
10735
10735
  const deserializeAws_restJson1DescribeThingCommandError = async (output, context) => {
10736
10736
  const parsedOutput = {
10737
10737
  ...output,
10738
- body: await parseBody(output.body, context),
10738
+ body: await parseErrorBody(output.body, context),
10739
10739
  };
10740
10740
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10741
10741
  switch (errorCode) {
@@ -10811,7 +10811,7 @@ exports.deserializeAws_restJson1DescribeThingGroupCommand = deserializeAws_restJ
10811
10811
  const deserializeAws_restJson1DescribeThingGroupCommandError = async (output, context) => {
10812
10812
  const parsedOutput = {
10813
10813
  ...output,
10814
- body: await parseBody(output.body, context),
10814
+ body: await parseErrorBody(output.body, context),
10815
10815
  };
10816
10816
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10817
10817
  switch (errorCode) {
@@ -10887,7 +10887,7 @@ exports.deserializeAws_restJson1DescribeThingRegistrationTaskCommand = deseriali
10887
10887
  const deserializeAws_restJson1DescribeThingRegistrationTaskCommandError = async (output, context) => {
10888
10888
  const parsedOutput = {
10889
10889
  ...output,
10890
- body: await parseBody(output.body, context),
10890
+ body: await parseErrorBody(output.body, context),
10891
10891
  };
10892
10892
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10893
10893
  switch (errorCode) {
@@ -10945,7 +10945,7 @@ exports.deserializeAws_restJson1DescribeThingTypeCommand = deserializeAws_restJs
10945
10945
  const deserializeAws_restJson1DescribeThingTypeCommandError = async (output, context) => {
10946
10946
  const parsedOutput = {
10947
10947
  ...output,
10948
- body: await parseBody(output.body, context),
10948
+ body: await parseErrorBody(output.body, context),
10949
10949
  };
10950
10950
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10951
10951
  switch (errorCode) {
@@ -10991,7 +10991,7 @@ exports.deserializeAws_restJson1DetachPolicyCommand = deserializeAws_restJson1De
10991
10991
  const deserializeAws_restJson1DetachPolicyCommandError = async (output, context) => {
10992
10992
  const parsedOutput = {
10993
10993
  ...output,
10994
- body: await parseBody(output.body, context),
10994
+ body: await parseErrorBody(output.body, context),
10995
10995
  };
10996
10996
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
10997
10997
  switch (errorCode) {
@@ -11037,7 +11037,7 @@ exports.deserializeAws_restJson1DetachPrincipalPolicyCommand = deserializeAws_re
11037
11037
  const deserializeAws_restJson1DetachPrincipalPolicyCommandError = async (output, context) => {
11038
11038
  const parsedOutput = {
11039
11039
  ...output,
11040
- body: await parseBody(output.body, context),
11040
+ body: await parseErrorBody(output.body, context),
11041
11041
  };
11042
11042
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11043
11043
  switch (errorCode) {
@@ -11083,7 +11083,7 @@ exports.deserializeAws_restJson1DetachSecurityProfileCommand = deserializeAws_re
11083
11083
  const deserializeAws_restJson1DetachSecurityProfileCommandError = async (output, context) => {
11084
11084
  const parsedOutput = {
11085
11085
  ...output,
11086
- body: await parseBody(output.body, context),
11086
+ body: await parseErrorBody(output.body, context),
11087
11087
  };
11088
11088
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11089
11089
  switch (errorCode) {
@@ -11123,7 +11123,7 @@ exports.deserializeAws_restJson1DetachThingPrincipalCommand = deserializeAws_res
11123
11123
  const deserializeAws_restJson1DetachThingPrincipalCommandError = async (output, context) => {
11124
11124
  const parsedOutput = {
11125
11125
  ...output,
11126
- body: await parseBody(output.body, context),
11126
+ body: await parseErrorBody(output.body, context),
11127
11127
  };
11128
11128
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11129
11129
  switch (errorCode) {
@@ -11169,7 +11169,7 @@ exports.deserializeAws_restJson1DisableTopicRuleCommand = deserializeAws_restJso
11169
11169
  const deserializeAws_restJson1DisableTopicRuleCommandError = async (output, context) => {
11170
11170
  const parsedOutput = {
11171
11171
  ...output,
11172
- body: await parseBody(output.body, context),
11172
+ body: await parseErrorBody(output.body, context),
11173
11173
  };
11174
11174
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11175
11175
  switch (errorCode) {
@@ -11212,7 +11212,7 @@ exports.deserializeAws_restJson1EnableTopicRuleCommand = deserializeAws_restJson
11212
11212
  const deserializeAws_restJson1EnableTopicRuleCommandError = async (output, context) => {
11213
11213
  const parsedOutput = {
11214
11214
  ...output,
11215
- body: await parseBody(output.body, context),
11215
+ body: await parseErrorBody(output.body, context),
11216
11216
  };
11217
11217
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11218
11218
  switch (errorCode) {
@@ -11261,7 +11261,7 @@ exports.deserializeAws_restJson1GetBehaviorModelTrainingSummariesCommand = deser
11261
11261
  const deserializeAws_restJson1GetBehaviorModelTrainingSummariesCommandError = async (output, context) => {
11262
11262
  const parsedOutput = {
11263
11263
  ...output,
11264
- body: await parseBody(output.body, context),
11264
+ body: await parseErrorBody(output.body, context),
11265
11265
  };
11266
11266
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11267
11267
  switch (errorCode) {
@@ -11307,7 +11307,7 @@ exports.deserializeAws_restJson1GetBucketsAggregationCommand = deserializeAws_re
11307
11307
  const deserializeAws_restJson1GetBucketsAggregationCommandError = async (output, context) => {
11308
11308
  const parsedOutput = {
11309
11309
  ...output,
11310
- body: await parseBody(output.body, context),
11310
+ body: await parseErrorBody(output.body, context),
11311
11311
  };
11312
11312
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11313
11313
  switch (errorCode) {
@@ -11365,7 +11365,7 @@ exports.deserializeAws_restJson1GetCardinalityCommand = deserializeAws_restJson1
11365
11365
  const deserializeAws_restJson1GetCardinalityCommandError = async (output, context) => {
11366
11366
  const parsedOutput = {
11367
11367
  ...output,
11368
- body: await parseBody(output.body, context),
11368
+ body: await parseErrorBody(output.body, context),
11369
11369
  };
11370
11370
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11371
11371
  switch (errorCode) {
@@ -11423,7 +11423,7 @@ exports.deserializeAws_restJson1GetEffectivePoliciesCommand = deserializeAws_res
11423
11423
  const deserializeAws_restJson1GetEffectivePoliciesCommandError = async (output, context) => {
11424
11424
  const parsedOutput = {
11425
11425
  ...output,
11426
- body: await parseBody(output.body, context),
11426
+ body: await parseErrorBody(output.body, context),
11427
11427
  };
11428
11428
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11429
11429
  switch (errorCode) {
@@ -11478,7 +11478,7 @@ exports.deserializeAws_restJson1GetIndexingConfigurationCommand = deserializeAws
11478
11478
  const deserializeAws_restJson1GetIndexingConfigurationCommandError = async (output, context) => {
11479
11479
  const parsedOutput = {
11480
11480
  ...output,
11481
- body: await parseBody(output.body, context),
11481
+ body: await parseErrorBody(output.body, context),
11482
11482
  };
11483
11483
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11484
11484
  switch (errorCode) {
@@ -11524,7 +11524,7 @@ exports.deserializeAws_restJson1GetJobDocumentCommand = deserializeAws_restJson1
11524
11524
  const deserializeAws_restJson1GetJobDocumentCommandError = async (output, context) => {
11525
11525
  const parsedOutput = {
11526
11526
  ...output,
11527
- body: await parseBody(output.body, context),
11527
+ body: await parseErrorBody(output.body, context),
11528
11528
  };
11529
11529
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11530
11530
  switch (errorCode) {
@@ -11570,7 +11570,7 @@ exports.deserializeAws_restJson1GetLoggingOptionsCommand = deserializeAws_restJs
11570
11570
  const deserializeAws_restJson1GetLoggingOptionsCommandError = async (output, context) => {
11571
11571
  const parsedOutput = {
11572
11572
  ...output,
11573
- body: await parseBody(output.body, context),
11573
+ body: await parseErrorBody(output.body, context),
11574
11574
  };
11575
11575
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11576
11576
  switch (errorCode) {
@@ -11610,7 +11610,7 @@ exports.deserializeAws_restJson1GetOTAUpdateCommand = deserializeAws_restJson1Ge
11610
11610
  const deserializeAws_restJson1GetOTAUpdateCommandError = async (output, context) => {
11611
11611
  const parsedOutput = {
11612
11612
  ...output,
11613
- body: await parseBody(output.body, context),
11613
+ body: await parseErrorBody(output.body, context),
11614
11614
  };
11615
11615
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11616
11616
  switch (errorCode) {
@@ -11659,7 +11659,7 @@ exports.deserializeAws_restJson1GetPercentilesCommand = deserializeAws_restJson1
11659
11659
  const deserializeAws_restJson1GetPercentilesCommandError = async (output, context) => {
11660
11660
  const parsedOutput = {
11661
11661
  ...output,
11662
- body: await parseBody(output.body, context),
11662
+ body: await parseErrorBody(output.body, context),
11663
11663
  };
11664
11664
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11665
11665
  switch (errorCode) {
@@ -11735,7 +11735,7 @@ exports.deserializeAws_restJson1GetPolicyCommand = deserializeAws_restJson1GetPo
11735
11735
  const deserializeAws_restJson1GetPolicyCommandError = async (output, context) => {
11736
11736
  const parsedOutput = {
11737
11737
  ...output,
11738
- body: await parseBody(output.body, context),
11738
+ body: await parseErrorBody(output.body, context),
11739
11739
  };
11740
11740
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11741
11741
  switch (errorCode) {
@@ -11805,7 +11805,7 @@ exports.deserializeAws_restJson1GetPolicyVersionCommand = deserializeAws_restJso
11805
11805
  const deserializeAws_restJson1GetPolicyVersionCommandError = async (output, context) => {
11806
11806
  const parsedOutput = {
11807
11807
  ...output,
11808
- body: await parseBody(output.body, context),
11808
+ body: await parseErrorBody(output.body, context),
11809
11809
  };
11810
11810
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11811
11811
  switch (errorCode) {
@@ -11854,7 +11854,7 @@ exports.deserializeAws_restJson1GetRegistrationCodeCommand = deserializeAws_rest
11854
11854
  const deserializeAws_restJson1GetRegistrationCodeCommandError = async (output, context) => {
11855
11855
  const parsedOutput = {
11856
11856
  ...output,
11857
- body: await parseBody(output.body, context),
11857
+ body: await parseErrorBody(output.body, context),
11858
11858
  };
11859
11859
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11860
11860
  switch (errorCode) {
@@ -11900,7 +11900,7 @@ exports.deserializeAws_restJson1GetStatisticsCommand = deserializeAws_restJson1G
11900
11900
  const deserializeAws_restJson1GetStatisticsCommandError = async (output, context) => {
11901
11901
  const parsedOutput = {
11902
11902
  ...output,
11903
- body: await parseBody(output.body, context),
11903
+ body: await parseErrorBody(output.body, context),
11904
11904
  };
11905
11905
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11906
11906
  switch (errorCode) {
@@ -11961,7 +11961,7 @@ exports.deserializeAws_restJson1GetTopicRuleCommand = deserializeAws_restJson1Ge
11961
11961
  const deserializeAws_restJson1GetTopicRuleCommandError = async (output, context) => {
11962
11962
  const parsedOutput = {
11963
11963
  ...output,
11964
- body: await parseBody(output.body, context),
11964
+ body: await parseErrorBody(output.body, context),
11965
11965
  };
11966
11966
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
11967
11967
  switch (errorCode) {
@@ -12004,7 +12004,7 @@ exports.deserializeAws_restJson1GetTopicRuleDestinationCommand = deserializeAws_
12004
12004
  const deserializeAws_restJson1GetTopicRuleDestinationCommandError = async (output, context) => {
12005
12005
  const parsedOutput = {
12006
12006
  ...output,
12007
- body: await parseBody(output.body, context),
12007
+ body: await parseErrorBody(output.body, context),
12008
12008
  };
12009
12009
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12010
12010
  switch (errorCode) {
@@ -12053,7 +12053,7 @@ exports.deserializeAws_restJson1GetV2LoggingOptionsCommand = deserializeAws_rest
12053
12053
  const deserializeAws_restJson1GetV2LoggingOptionsCommandError = async (output, context) => {
12054
12054
  const parsedOutput = {
12055
12055
  ...output,
12056
- body: await parseBody(output.body, context),
12056
+ body: await parseErrorBody(output.body, context),
12057
12057
  };
12058
12058
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12059
12059
  switch (errorCode) {
@@ -12096,7 +12096,7 @@ exports.deserializeAws_restJson1ListActiveViolationsCommand = deserializeAws_res
12096
12096
  const deserializeAws_restJson1ListActiveViolationsCommandError = async (output, context) => {
12097
12097
  const parsedOutput = {
12098
12098
  ...output,
12099
- body: await parseBody(output.body, context),
12099
+ body: await parseErrorBody(output.body, context),
12100
12100
  };
12101
12101
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12102
12102
  switch (errorCode) {
@@ -12142,7 +12142,7 @@ exports.deserializeAws_restJson1ListAttachedPoliciesCommand = deserializeAws_res
12142
12142
  const deserializeAws_restJson1ListAttachedPoliciesCommandError = async (output, context) => {
12143
12143
  const parsedOutput = {
12144
12144
  ...output,
12145
- body: await parseBody(output.body, context),
12145
+ body: await parseErrorBody(output.body, context),
12146
12146
  };
12147
12147
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12148
12148
  switch (errorCode) {
@@ -12197,7 +12197,7 @@ exports.deserializeAws_restJson1ListAuditFindingsCommand = deserializeAws_restJs
12197
12197
  const deserializeAws_restJson1ListAuditFindingsCommandError = async (output, context) => {
12198
12198
  const parsedOutput = {
12199
12199
  ...output,
12200
- body: await parseBody(output.body, context),
12200
+ body: await parseErrorBody(output.body, context),
12201
12201
  };
12202
12202
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12203
12203
  switch (errorCode) {
@@ -12240,7 +12240,7 @@ exports.deserializeAws_restJson1ListAuditMitigationActionsExecutionsCommand = de
12240
12240
  const deserializeAws_restJson1ListAuditMitigationActionsExecutionsCommandError = async (output, context) => {
12241
12241
  const parsedOutput = {
12242
12242
  ...output,
12243
- body: await parseBody(output.body, context),
12243
+ body: await parseErrorBody(output.body, context),
12244
12244
  };
12245
12245
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12246
12246
  switch (errorCode) {
@@ -12283,7 +12283,7 @@ exports.deserializeAws_restJson1ListAuditMitigationActionsTasksCommand = deseria
12283
12283
  const deserializeAws_restJson1ListAuditMitigationActionsTasksCommandError = async (output, context) => {
12284
12284
  const parsedOutput = {
12285
12285
  ...output,
12286
- body: await parseBody(output.body, context),
12286
+ body: await parseErrorBody(output.body, context),
12287
12287
  };
12288
12288
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12289
12289
  switch (errorCode) {
@@ -12326,7 +12326,7 @@ exports.deserializeAws_restJson1ListAuditSuppressionsCommand = deserializeAws_re
12326
12326
  const deserializeAws_restJson1ListAuditSuppressionsCommandError = async (output, context) => {
12327
12327
  const parsedOutput = {
12328
12328
  ...output,
12329
- body: await parseBody(output.body, context),
12329
+ body: await parseErrorBody(output.body, context),
12330
12330
  };
12331
12331
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12332
12332
  switch (errorCode) {
@@ -12369,7 +12369,7 @@ exports.deserializeAws_restJson1ListAuditTasksCommand = deserializeAws_restJson1
12369
12369
  const deserializeAws_restJson1ListAuditTasksCommandError = async (output, context) => {
12370
12370
  const parsedOutput = {
12371
12371
  ...output,
12372
- body: await parseBody(output.body, context),
12372
+ body: await parseErrorBody(output.body, context),
12373
12373
  };
12374
12374
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12375
12375
  switch (errorCode) {
@@ -12412,7 +12412,7 @@ exports.deserializeAws_restJson1ListAuthorizersCommand = deserializeAws_restJson
12412
12412
  const deserializeAws_restJson1ListAuthorizersCommandError = async (output, context) => {
12413
12413
  const parsedOutput = {
12414
12414
  ...output,
12415
- body: await parseBody(output.body, context),
12415
+ body: await parseErrorBody(output.body, context),
12416
12416
  };
12417
12417
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12418
12418
  switch (errorCode) {
@@ -12461,7 +12461,7 @@ exports.deserializeAws_restJson1ListBillingGroupsCommand = deserializeAws_restJs
12461
12461
  const deserializeAws_restJson1ListBillingGroupsCommandError = async (output, context) => {
12462
12462
  const parsedOutput = {
12463
12463
  ...output,
12464
- body: await parseBody(output.body, context),
12464
+ body: await parseErrorBody(output.body, context),
12465
12465
  };
12466
12466
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12467
12467
  switch (errorCode) {
@@ -12507,7 +12507,7 @@ exports.deserializeAws_restJson1ListCACertificatesCommand = deserializeAws_restJ
12507
12507
  const deserializeAws_restJson1ListCACertificatesCommandError = async (output, context) => {
12508
12508
  const parsedOutput = {
12509
12509
  ...output,
12510
- body: await parseBody(output.body, context),
12510
+ body: await parseErrorBody(output.body, context),
12511
12511
  };
12512
12512
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12513
12513
  switch (errorCode) {
@@ -12556,7 +12556,7 @@ exports.deserializeAws_restJson1ListCertificatesCommand = deserializeAws_restJso
12556
12556
  const deserializeAws_restJson1ListCertificatesCommandError = async (output, context) => {
12557
12557
  const parsedOutput = {
12558
12558
  ...output,
12559
- body: await parseBody(output.body, context),
12559
+ body: await parseErrorBody(output.body, context),
12560
12560
  };
12561
12561
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12562
12562
  switch (errorCode) {
@@ -12605,7 +12605,7 @@ exports.deserializeAws_restJson1ListCertificatesByCACommand = deserializeAws_res
12605
12605
  const deserializeAws_restJson1ListCertificatesByCACommandError = async (output, context) => {
12606
12606
  const parsedOutput = {
12607
12607
  ...output,
12608
- body: await parseBody(output.body, context),
12608
+ body: await parseErrorBody(output.body, context),
12609
12609
  };
12610
12610
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12611
12611
  switch (errorCode) {
@@ -12654,7 +12654,7 @@ exports.deserializeAws_restJson1ListCustomMetricsCommand = deserializeAws_restJs
12654
12654
  const deserializeAws_restJson1ListCustomMetricsCommandError = async (output, context) => {
12655
12655
  const parsedOutput = {
12656
12656
  ...output,
12657
- body: await parseBody(output.body, context),
12657
+ body: await parseErrorBody(output.body, context),
12658
12658
  };
12659
12659
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12660
12660
  switch (errorCode) {
@@ -12697,7 +12697,7 @@ exports.deserializeAws_restJson1ListDetectMitigationActionsExecutionsCommand = d
12697
12697
  const deserializeAws_restJson1ListDetectMitigationActionsExecutionsCommandError = async (output, context) => {
12698
12698
  const parsedOutput = {
12699
12699
  ...output,
12700
- body: await parseBody(output.body, context),
12700
+ body: await parseErrorBody(output.body, context),
12701
12701
  };
12702
12702
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12703
12703
  switch (errorCode) {
@@ -12740,7 +12740,7 @@ exports.deserializeAws_restJson1ListDetectMitigationActionsTasksCommand = deseri
12740
12740
  const deserializeAws_restJson1ListDetectMitigationActionsTasksCommandError = async (output, context) => {
12741
12741
  const parsedOutput = {
12742
12742
  ...output,
12743
- body: await parseBody(output.body, context),
12743
+ body: await parseErrorBody(output.body, context),
12744
12744
  };
12745
12745
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12746
12746
  switch (errorCode) {
@@ -12783,7 +12783,7 @@ exports.deserializeAws_restJson1ListDimensionsCommand = deserializeAws_restJson1
12783
12783
  const deserializeAws_restJson1ListDimensionsCommandError = async (output, context) => {
12784
12784
  const parsedOutput = {
12785
12785
  ...output,
12786
- body: await parseBody(output.body, context),
12786
+ body: await parseErrorBody(output.body, context),
12787
12787
  };
12788
12788
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12789
12789
  switch (errorCode) {
@@ -12826,7 +12826,7 @@ exports.deserializeAws_restJson1ListDomainConfigurationsCommand = deserializeAws
12826
12826
  const deserializeAws_restJson1ListDomainConfigurationsCommandError = async (output, context) => {
12827
12827
  const parsedOutput = {
12828
12828
  ...output,
12829
- body: await parseBody(output.body, context),
12829
+ body: await parseErrorBody(output.body, context),
12830
12830
  };
12831
12831
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12832
12832
  switch (errorCode) {
@@ -12875,7 +12875,7 @@ exports.deserializeAws_restJson1ListFleetMetricsCommand = deserializeAws_restJso
12875
12875
  const deserializeAws_restJson1ListFleetMetricsCommandError = async (output, context) => {
12876
12876
  const parsedOutput = {
12877
12877
  ...output,
12878
- body: await parseBody(output.body, context),
12878
+ body: await parseErrorBody(output.body, context),
12879
12879
  };
12880
12880
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12881
12881
  switch (errorCode) {
@@ -12924,7 +12924,7 @@ exports.deserializeAws_restJson1ListIndicesCommand = deserializeAws_restJson1Lis
12924
12924
  const deserializeAws_restJson1ListIndicesCommandError = async (output, context) => {
12925
12925
  const parsedOutput = {
12926
12926
  ...output,
12927
- body: await parseBody(output.body, context),
12927
+ body: await parseErrorBody(output.body, context),
12928
12928
  };
12929
12929
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12930
12930
  switch (errorCode) {
@@ -12973,7 +12973,7 @@ exports.deserializeAws_restJson1ListJobExecutionsForJobCommand = deserializeAws_
12973
12973
  const deserializeAws_restJson1ListJobExecutionsForJobCommandError = async (output, context) => {
12974
12974
  const parsedOutput = {
12975
12975
  ...output,
12976
- body: await parseBody(output.body, context),
12976
+ body: await parseErrorBody(output.body, context),
12977
12977
  };
12978
12978
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
12979
12979
  switch (errorCode) {
@@ -13019,7 +13019,7 @@ exports.deserializeAws_restJson1ListJobExecutionsForThingCommand = deserializeAw
13019
13019
  const deserializeAws_restJson1ListJobExecutionsForThingCommandError = async (output, context) => {
13020
13020
  const parsedOutput = {
13021
13021
  ...output,
13022
- body: await parseBody(output.body, context),
13022
+ body: await parseErrorBody(output.body, context),
13023
13023
  };
13024
13024
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13025
13025
  switch (errorCode) {
@@ -13065,7 +13065,7 @@ exports.deserializeAws_restJson1ListJobsCommand = deserializeAws_restJson1ListJo
13065
13065
  const deserializeAws_restJson1ListJobsCommandError = async (output, context) => {
13066
13066
  const parsedOutput = {
13067
13067
  ...output,
13068
- body: await parseBody(output.body, context),
13068
+ body: await parseErrorBody(output.body, context),
13069
13069
  };
13070
13070
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13071
13071
  switch (errorCode) {
@@ -13111,7 +13111,7 @@ exports.deserializeAws_restJson1ListJobTemplatesCommand = deserializeAws_restJso
13111
13111
  const deserializeAws_restJson1ListJobTemplatesCommandError = async (output, context) => {
13112
13112
  const parsedOutput = {
13113
13113
  ...output,
13114
- body: await parseBody(output.body, context),
13114
+ body: await parseErrorBody(output.body, context),
13115
13115
  };
13116
13116
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13117
13117
  switch (errorCode) {
@@ -13154,7 +13154,7 @@ exports.deserializeAws_restJson1ListManagedJobTemplatesCommand = deserializeAws_
13154
13154
  const deserializeAws_restJson1ListManagedJobTemplatesCommandError = async (output, context) => {
13155
13155
  const parsedOutput = {
13156
13156
  ...output,
13157
- body: await parseBody(output.body, context),
13157
+ body: await parseErrorBody(output.body, context),
13158
13158
  };
13159
13159
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13160
13160
  switch (errorCode) {
@@ -13200,7 +13200,7 @@ exports.deserializeAws_restJson1ListMetricValuesCommand = deserializeAws_restJso
13200
13200
  const deserializeAws_restJson1ListMetricValuesCommandError = async (output, context) => {
13201
13201
  const parsedOutput = {
13202
13202
  ...output,
13203
- body: await parseBody(output.body, context),
13203
+ body: await parseErrorBody(output.body, context),
13204
13204
  };
13205
13205
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13206
13206
  switch (errorCode) {
@@ -13246,7 +13246,7 @@ exports.deserializeAws_restJson1ListMitigationActionsCommand = deserializeAws_re
13246
13246
  const deserializeAws_restJson1ListMitigationActionsCommandError = async (output, context) => {
13247
13247
  const parsedOutput = {
13248
13248
  ...output,
13249
- body: await parseBody(output.body, context),
13249
+ body: await parseErrorBody(output.body, context),
13250
13250
  };
13251
13251
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13252
13252
  switch (errorCode) {
@@ -13289,7 +13289,7 @@ exports.deserializeAws_restJson1ListOTAUpdatesCommand = deserializeAws_restJson1
13289
13289
  const deserializeAws_restJson1ListOTAUpdatesCommandError = async (output, context) => {
13290
13290
  const parsedOutput = {
13291
13291
  ...output,
13292
- body: await parseBody(output.body, context),
13292
+ body: await parseErrorBody(output.body, context),
13293
13293
  };
13294
13294
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13295
13295
  switch (errorCode) {
@@ -13338,7 +13338,7 @@ exports.deserializeAws_restJson1ListOutgoingCertificatesCommand = deserializeAws
13338
13338
  const deserializeAws_restJson1ListOutgoingCertificatesCommandError = async (output, context) => {
13339
13339
  const parsedOutput = {
13340
13340
  ...output,
13341
- body: await parseBody(output.body, context),
13341
+ body: await parseErrorBody(output.body, context),
13342
13342
  };
13343
13343
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13344
13344
  switch (errorCode) {
@@ -13387,7 +13387,7 @@ exports.deserializeAws_restJson1ListPoliciesCommand = deserializeAws_restJson1Li
13387
13387
  const deserializeAws_restJson1ListPoliciesCommandError = async (output, context) => {
13388
13388
  const parsedOutput = {
13389
13389
  ...output,
13390
- body: await parseBody(output.body, context),
13390
+ body: await parseErrorBody(output.body, context),
13391
13391
  };
13392
13392
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13393
13393
  switch (errorCode) {
@@ -13436,7 +13436,7 @@ exports.deserializeAws_restJson1ListPolicyPrincipalsCommand = deserializeAws_res
13436
13436
  const deserializeAws_restJson1ListPolicyPrincipalsCommandError = async (output, context) => {
13437
13437
  const parsedOutput = {
13438
13438
  ...output,
13439
- body: await parseBody(output.body, context),
13439
+ body: await parseErrorBody(output.body, context),
13440
13440
  };
13441
13441
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13442
13442
  switch (errorCode) {
@@ -13485,7 +13485,7 @@ exports.deserializeAws_restJson1ListPolicyVersionsCommand = deserializeAws_restJ
13485
13485
  const deserializeAws_restJson1ListPolicyVersionsCommandError = async (output, context) => {
13486
13486
  const parsedOutput = {
13487
13487
  ...output,
13488
- body: await parseBody(output.body, context),
13488
+ body: await parseErrorBody(output.body, context),
13489
13489
  };
13490
13490
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13491
13491
  switch (errorCode) {
@@ -13537,7 +13537,7 @@ exports.deserializeAws_restJson1ListPrincipalPoliciesCommand = deserializeAws_re
13537
13537
  const deserializeAws_restJson1ListPrincipalPoliciesCommandError = async (output, context) => {
13538
13538
  const parsedOutput = {
13539
13539
  ...output,
13540
- body: await parseBody(output.body, context),
13540
+ body: await parseErrorBody(output.body, context),
13541
13541
  };
13542
13542
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13543
13543
  switch (errorCode) {
@@ -13589,7 +13589,7 @@ exports.deserializeAws_restJson1ListPrincipalThingsCommand = deserializeAws_rest
13589
13589
  const deserializeAws_restJson1ListPrincipalThingsCommandError = async (output, context) => {
13590
13590
  const parsedOutput = {
13591
13591
  ...output,
13592
- body: await parseBody(output.body, context),
13592
+ body: await parseErrorBody(output.body, context),
13593
13593
  };
13594
13594
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13595
13595
  switch (errorCode) {
@@ -13641,7 +13641,7 @@ exports.deserializeAws_restJson1ListProvisioningTemplatesCommand = deserializeAw
13641
13641
  const deserializeAws_restJson1ListProvisioningTemplatesCommandError = async (output, context) => {
13642
13642
  const parsedOutput = {
13643
13643
  ...output,
13644
- body: await parseBody(output.body, context),
13644
+ body: await parseErrorBody(output.body, context),
13645
13645
  };
13646
13646
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13647
13647
  switch (errorCode) {
@@ -13687,7 +13687,7 @@ exports.deserializeAws_restJson1ListProvisioningTemplateVersionsCommand = deseri
13687
13687
  const deserializeAws_restJson1ListProvisioningTemplateVersionsCommandError = async (output, context) => {
13688
13688
  const parsedOutput = {
13689
13689
  ...output,
13690
- body: await parseBody(output.body, context),
13690
+ body: await parseErrorBody(output.body, context),
13691
13691
  };
13692
13692
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13693
13693
  switch (errorCode) {
@@ -13736,7 +13736,7 @@ exports.deserializeAws_restJson1ListRoleAliasesCommand = deserializeAws_restJson
13736
13736
  const deserializeAws_restJson1ListRoleAliasesCommandError = async (output, context) => {
13737
13737
  const parsedOutput = {
13738
13738
  ...output,
13739
- body: await parseBody(output.body, context),
13739
+ body: await parseErrorBody(output.body, context),
13740
13740
  };
13741
13741
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13742
13742
  switch (errorCode) {
@@ -13785,7 +13785,7 @@ exports.deserializeAws_restJson1ListScheduledAuditsCommand = deserializeAws_rest
13785
13785
  const deserializeAws_restJson1ListScheduledAuditsCommandError = async (output, context) => {
13786
13786
  const parsedOutput = {
13787
13787
  ...output,
13788
- body: await parseBody(output.body, context),
13788
+ body: await parseErrorBody(output.body, context),
13789
13789
  };
13790
13790
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13791
13791
  switch (errorCode) {
@@ -13828,7 +13828,7 @@ exports.deserializeAws_restJson1ListSecurityProfilesCommand = deserializeAws_res
13828
13828
  const deserializeAws_restJson1ListSecurityProfilesCommandError = async (output, context) => {
13829
13829
  const parsedOutput = {
13830
13830
  ...output,
13831
- body: await parseBody(output.body, context),
13831
+ body: await parseErrorBody(output.body, context),
13832
13832
  };
13833
13833
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13834
13834
  switch (errorCode) {
@@ -13874,7 +13874,7 @@ exports.deserializeAws_restJson1ListSecurityProfilesForTargetCommand = deseriali
13874
13874
  const deserializeAws_restJson1ListSecurityProfilesForTargetCommandError = async (output, context) => {
13875
13875
  const parsedOutput = {
13876
13876
  ...output,
13877
- body: await parseBody(output.body, context),
13877
+ body: await parseErrorBody(output.body, context),
13878
13878
  };
13879
13879
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13880
13880
  switch (errorCode) {
@@ -13920,7 +13920,7 @@ exports.deserializeAws_restJson1ListStreamsCommand = deserializeAws_restJson1Lis
13920
13920
  const deserializeAws_restJson1ListStreamsCommandError = async (output, context) => {
13921
13921
  const parsedOutput = {
13922
13922
  ...output,
13923
- body: await parseBody(output.body, context),
13923
+ body: await parseErrorBody(output.body, context),
13924
13924
  };
13925
13925
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13926
13926
  switch (errorCode) {
@@ -13969,7 +13969,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
13969
13969
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
13970
13970
  const parsedOutput = {
13971
13971
  ...output,
13972
- body: await parseBody(output.body, context),
13972
+ body: await parseErrorBody(output.body, context),
13973
13973
  };
13974
13974
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
13975
13975
  switch (errorCode) {
@@ -14015,7 +14015,7 @@ exports.deserializeAws_restJson1ListTargetsForPolicyCommand = deserializeAws_res
14015
14015
  const deserializeAws_restJson1ListTargetsForPolicyCommandError = async (output, context) => {
14016
14016
  const parsedOutput = {
14017
14017
  ...output,
14018
- body: await parseBody(output.body, context),
14018
+ body: await parseErrorBody(output.body, context),
14019
14019
  };
14020
14020
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14021
14021
  switch (errorCode) {
@@ -14070,7 +14070,7 @@ exports.deserializeAws_restJson1ListTargetsForSecurityProfileCommand = deseriali
14070
14070
  const deserializeAws_restJson1ListTargetsForSecurityProfileCommandError = async (output, context) => {
14071
14071
  const parsedOutput = {
14072
14072
  ...output,
14073
- body: await parseBody(output.body, context),
14073
+ body: await parseErrorBody(output.body, context),
14074
14074
  };
14075
14075
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14076
14076
  switch (errorCode) {
@@ -14116,7 +14116,7 @@ exports.deserializeAws_restJson1ListThingGroupsCommand = deserializeAws_restJson
14116
14116
  const deserializeAws_restJson1ListThingGroupsCommandError = async (output, context) => {
14117
14117
  const parsedOutput = {
14118
14118
  ...output,
14119
- body: await parseBody(output.body, context),
14119
+ body: await parseErrorBody(output.body, context),
14120
14120
  };
14121
14121
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14122
14122
  switch (errorCode) {
@@ -14162,7 +14162,7 @@ exports.deserializeAws_restJson1ListThingGroupsForThingCommand = deserializeAws_
14162
14162
  const deserializeAws_restJson1ListThingGroupsForThingCommandError = async (output, context) => {
14163
14163
  const parsedOutput = {
14164
14164
  ...output,
14165
- body: await parseBody(output.body, context),
14165
+ body: await parseErrorBody(output.body, context),
14166
14166
  };
14167
14167
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14168
14168
  switch (errorCode) {
@@ -14208,7 +14208,7 @@ exports.deserializeAws_restJson1ListThingPrincipalsCommand = deserializeAws_rest
14208
14208
  const deserializeAws_restJson1ListThingPrincipalsCommandError = async (output, context) => {
14209
14209
  const parsedOutput = {
14210
14210
  ...output,
14211
- body: await parseBody(output.body, context),
14211
+ body: await parseErrorBody(output.body, context),
14212
14212
  };
14213
14213
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14214
14214
  switch (errorCode) {
@@ -14263,7 +14263,7 @@ exports.deserializeAws_restJson1ListThingRegistrationTaskReportsCommand = deseri
14263
14263
  const deserializeAws_restJson1ListThingRegistrationTaskReportsCommandError = async (output, context) => {
14264
14264
  const parsedOutput = {
14265
14265
  ...output,
14266
- body: await parseBody(output.body, context),
14266
+ body: await parseErrorBody(output.body, context),
14267
14267
  };
14268
14268
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14269
14269
  switch (errorCode) {
@@ -14309,7 +14309,7 @@ exports.deserializeAws_restJson1ListThingRegistrationTasksCommand = deserializeA
14309
14309
  const deserializeAws_restJson1ListThingRegistrationTasksCommandError = async (output, context) => {
14310
14310
  const parsedOutput = {
14311
14311
  ...output,
14312
- body: await parseBody(output.body, context),
14312
+ body: await parseErrorBody(output.body, context),
14313
14313
  };
14314
14314
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14315
14315
  switch (errorCode) {
@@ -14355,7 +14355,7 @@ exports.deserializeAws_restJson1ListThingsCommand = deserializeAws_restJson1List
14355
14355
  const deserializeAws_restJson1ListThingsCommandError = async (output, context) => {
14356
14356
  const parsedOutput = {
14357
14357
  ...output,
14358
- body: await parseBody(output.body, context),
14358
+ body: await parseErrorBody(output.body, context),
14359
14359
  };
14360
14360
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14361
14361
  switch (errorCode) {
@@ -14404,7 +14404,7 @@ exports.deserializeAws_restJson1ListThingsInBillingGroupCommand = deserializeAws
14404
14404
  const deserializeAws_restJson1ListThingsInBillingGroupCommandError = async (output, context) => {
14405
14405
  const parsedOutput = {
14406
14406
  ...output,
14407
- body: await parseBody(output.body, context),
14407
+ body: await parseErrorBody(output.body, context),
14408
14408
  };
14409
14409
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14410
14410
  switch (errorCode) {
@@ -14450,7 +14450,7 @@ exports.deserializeAws_restJson1ListThingsInThingGroupCommand = deserializeAws_r
14450
14450
  const deserializeAws_restJson1ListThingsInThingGroupCommandError = async (output, context) => {
14451
14451
  const parsedOutput = {
14452
14452
  ...output,
14453
- body: await parseBody(output.body, context),
14453
+ body: await parseErrorBody(output.body, context),
14454
14454
  };
14455
14455
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14456
14456
  switch (errorCode) {
@@ -14496,7 +14496,7 @@ exports.deserializeAws_restJson1ListThingTypesCommand = deserializeAws_restJson1
14496
14496
  const deserializeAws_restJson1ListThingTypesCommandError = async (output, context) => {
14497
14497
  const parsedOutput = {
14498
14498
  ...output,
14499
- body: await parseBody(output.body, context),
14499
+ body: await parseErrorBody(output.body, context),
14500
14500
  };
14501
14501
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14502
14502
  switch (errorCode) {
@@ -14545,7 +14545,7 @@ exports.deserializeAws_restJson1ListTopicRuleDestinationsCommand = deserializeAw
14545
14545
  const deserializeAws_restJson1ListTopicRuleDestinationsCommandError = async (output, context) => {
14546
14546
  const parsedOutput = {
14547
14547
  ...output,
14548
- body: await parseBody(output.body, context),
14548
+ body: await parseErrorBody(output.body, context),
14549
14549
  };
14550
14550
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14551
14551
  switch (errorCode) {
@@ -14591,7 +14591,7 @@ exports.deserializeAws_restJson1ListTopicRulesCommand = deserializeAws_restJson1
14591
14591
  const deserializeAws_restJson1ListTopicRulesCommandError = async (output, context) => {
14592
14592
  const parsedOutput = {
14593
14593
  ...output,
14594
- body: await parseBody(output.body, context),
14594
+ body: await parseErrorBody(output.body, context),
14595
14595
  };
14596
14596
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14597
14597
  switch (errorCode) {
@@ -14634,7 +14634,7 @@ exports.deserializeAws_restJson1ListV2LoggingLevelsCommand = deserializeAws_rest
14634
14634
  const deserializeAws_restJson1ListV2LoggingLevelsCommandError = async (output, context) => {
14635
14635
  const parsedOutput = {
14636
14636
  ...output,
14637
- body: await parseBody(output.body, context),
14637
+ body: await parseErrorBody(output.body, context),
14638
14638
  };
14639
14639
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14640
14640
  switch (errorCode) {
@@ -14680,7 +14680,7 @@ exports.deserializeAws_restJson1ListViolationEventsCommand = deserializeAws_rest
14680
14680
  const deserializeAws_restJson1ListViolationEventsCommandError = async (output, context) => {
14681
14681
  const parsedOutput = {
14682
14682
  ...output,
14683
- body: await parseBody(output.body, context),
14683
+ body: await parseErrorBody(output.body, context),
14684
14684
  };
14685
14685
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14686
14686
  switch (errorCode) {
@@ -14717,7 +14717,7 @@ exports.deserializeAws_restJson1PutVerificationStateOnViolationCommand = deseria
14717
14717
  const deserializeAws_restJson1PutVerificationStateOnViolationCommandError = async (output, context) => {
14718
14718
  const parsedOutput = {
14719
14719
  ...output,
14720
- body: await parseBody(output.body, context),
14720
+ body: await parseErrorBody(output.body, context),
14721
14721
  };
14722
14722
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14723
14723
  switch (errorCode) {
@@ -14760,7 +14760,7 @@ exports.deserializeAws_restJson1RegisterCACertificateCommand = deserializeAws_re
14760
14760
  const deserializeAws_restJson1RegisterCACertificateCommandError = async (output, context) => {
14761
14761
  const parsedOutput = {
14762
14762
  ...output,
14763
- body: await parseBody(output.body, context),
14763
+ body: await parseErrorBody(output.body, context),
14764
14764
  };
14765
14765
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14766
14766
  switch (errorCode) {
@@ -14824,7 +14824,7 @@ exports.deserializeAws_restJson1RegisterCertificateCommand = deserializeAws_rest
14824
14824
  const deserializeAws_restJson1RegisterCertificateCommandError = async (output, context) => {
14825
14825
  const parsedOutput = {
14826
14826
  ...output,
14827
- body: await parseBody(output.body, context),
14827
+ body: await parseErrorBody(output.body, context),
14828
14828
  };
14829
14829
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14830
14830
  switch (errorCode) {
@@ -14885,7 +14885,7 @@ exports.deserializeAws_restJson1RegisterCertificateWithoutCACommand = deserializ
14885
14885
  const deserializeAws_restJson1RegisterCertificateWithoutCACommandError = async (output, context) => {
14886
14886
  const parsedOutput = {
14887
14887
  ...output,
14888
- body: await parseBody(output.body, context),
14888
+ body: await parseErrorBody(output.body, context),
14889
14889
  };
14890
14890
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14891
14891
  switch (errorCode) {
@@ -14943,7 +14943,7 @@ exports.deserializeAws_restJson1RegisterThingCommand = deserializeAws_restJson1R
14943
14943
  const deserializeAws_restJson1RegisterThingCommandError = async (output, context) => {
14944
14944
  const parsedOutput = {
14945
14945
  ...output,
14946
- body: await parseBody(output.body, context),
14946
+ body: await parseErrorBody(output.body, context),
14947
14947
  };
14948
14948
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14949
14949
  switch (errorCode) {
@@ -14992,7 +14992,7 @@ exports.deserializeAws_restJson1RejectCertificateTransferCommand = deserializeAw
14992
14992
  const deserializeAws_restJson1RejectCertificateTransferCommandError = async (output, context) => {
14993
14993
  const parsedOutput = {
14994
14994
  ...output,
14995
- body: await parseBody(output.body, context),
14995
+ body: await parseErrorBody(output.body, context),
14996
14996
  };
14997
14997
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
14998
14998
  switch (errorCode) {
@@ -15041,7 +15041,7 @@ exports.deserializeAws_restJson1RemoveThingFromBillingGroupCommand = deserialize
15041
15041
  const deserializeAws_restJson1RemoveThingFromBillingGroupCommandError = async (output, context) => {
15042
15042
  const parsedOutput = {
15043
15043
  ...output,
15044
- body: await parseBody(output.body, context),
15044
+ body: await parseErrorBody(output.body, context),
15045
15045
  };
15046
15046
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15047
15047
  switch (errorCode) {
@@ -15081,7 +15081,7 @@ exports.deserializeAws_restJson1RemoveThingFromThingGroupCommand = deserializeAw
15081
15081
  const deserializeAws_restJson1RemoveThingFromThingGroupCommandError = async (output, context) => {
15082
15082
  const parsedOutput = {
15083
15083
  ...output,
15084
- body: await parseBody(output.body, context),
15084
+ body: await parseErrorBody(output.body, context),
15085
15085
  };
15086
15086
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15087
15087
  switch (errorCode) {
@@ -15121,7 +15121,7 @@ exports.deserializeAws_restJson1ReplaceTopicRuleCommand = deserializeAws_restJso
15121
15121
  const deserializeAws_restJson1ReplaceTopicRuleCommandError = async (output, context) => {
15122
15122
  const parsedOutput = {
15123
15123
  ...output,
15124
- body: await parseBody(output.body, context),
15124
+ body: await parseErrorBody(output.body, context),
15125
15125
  };
15126
15126
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15127
15127
  switch (errorCode) {
@@ -15176,7 +15176,7 @@ exports.deserializeAws_restJson1SearchIndexCommand = deserializeAws_restJson1Sea
15176
15176
  const deserializeAws_restJson1SearchIndexCommandError = async (output, context) => {
15177
15177
  const parsedOutput = {
15178
15178
  ...output,
15179
- body: await parseBody(output.body, context),
15179
+ body: await parseErrorBody(output.body, context),
15180
15180
  };
15181
15181
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15182
15182
  switch (errorCode) {
@@ -15234,7 +15234,7 @@ exports.deserializeAws_restJson1SetDefaultAuthorizerCommand = deserializeAws_res
15234
15234
  const deserializeAws_restJson1SetDefaultAuthorizerCommandError = async (output, context) => {
15235
15235
  const parsedOutput = {
15236
15236
  ...output,
15237
- body: await parseBody(output.body, context),
15237
+ body: await parseErrorBody(output.body, context),
15238
15238
  };
15239
15239
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15240
15240
  switch (errorCode) {
@@ -15283,7 +15283,7 @@ exports.deserializeAws_restJson1SetDefaultPolicyVersionCommand = deserializeAws_
15283
15283
  const deserializeAws_restJson1SetDefaultPolicyVersionCommandError = async (output, context) => {
15284
15284
  const parsedOutput = {
15285
15285
  ...output,
15286
- body: await parseBody(output.body, context),
15286
+ body: await parseErrorBody(output.body, context),
15287
15287
  };
15288
15288
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15289
15289
  switch (errorCode) {
@@ -15329,7 +15329,7 @@ exports.deserializeAws_restJson1SetLoggingOptionsCommand = deserializeAws_restJs
15329
15329
  const deserializeAws_restJson1SetLoggingOptionsCommandError = async (output, context) => {
15330
15330
  const parsedOutput = {
15331
15331
  ...output,
15332
- body: await parseBody(output.body, context),
15332
+ body: await parseErrorBody(output.body, context),
15333
15333
  };
15334
15334
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15335
15335
  switch (errorCode) {
@@ -15366,7 +15366,7 @@ exports.deserializeAws_restJson1SetV2LoggingLevelCommand = deserializeAws_restJs
15366
15366
  const deserializeAws_restJson1SetV2LoggingLevelCommandError = async (output, context) => {
15367
15367
  const parsedOutput = {
15368
15368
  ...output,
15369
- body: await parseBody(output.body, context),
15369
+ body: await parseErrorBody(output.body, context),
15370
15370
  };
15371
15371
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15372
15372
  switch (errorCode) {
@@ -15409,7 +15409,7 @@ exports.deserializeAws_restJson1SetV2LoggingOptionsCommand = deserializeAws_rest
15409
15409
  const deserializeAws_restJson1SetV2LoggingOptionsCommandError = async (output, context) => {
15410
15410
  const parsedOutput = {
15411
15411
  ...output,
15412
- body: await parseBody(output.body, context),
15412
+ body: await parseErrorBody(output.body, context),
15413
15413
  };
15414
15414
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15415
15415
  switch (errorCode) {
@@ -15449,7 +15449,7 @@ exports.deserializeAws_restJson1StartAuditMitigationActionsTaskCommand = deseria
15449
15449
  const deserializeAws_restJson1StartAuditMitigationActionsTaskCommandError = async (output, context) => {
15450
15450
  const parsedOutput = {
15451
15451
  ...output,
15452
- body: await parseBody(output.body, context),
15452
+ body: await parseErrorBody(output.body, context),
15453
15453
  };
15454
15454
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15455
15455
  switch (errorCode) {
@@ -15495,7 +15495,7 @@ exports.deserializeAws_restJson1StartDetectMitigationActionsTaskCommand = deseri
15495
15495
  const deserializeAws_restJson1StartDetectMitigationActionsTaskCommandError = async (output, context) => {
15496
15496
  const parsedOutput = {
15497
15497
  ...output,
15498
- body: await parseBody(output.body, context),
15498
+ body: await parseErrorBody(output.body, context),
15499
15499
  };
15500
15500
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15501
15501
  switch (errorCode) {
@@ -15541,7 +15541,7 @@ exports.deserializeAws_restJson1StartOnDemandAuditTaskCommand = deserializeAws_r
15541
15541
  const deserializeAws_restJson1StartOnDemandAuditTaskCommandError = async (output, context) => {
15542
15542
  const parsedOutput = {
15543
15543
  ...output,
15544
- body: await parseBody(output.body, context),
15544
+ body: await parseErrorBody(output.body, context),
15545
15545
  };
15546
15546
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15547
15547
  switch (errorCode) {
@@ -15584,7 +15584,7 @@ exports.deserializeAws_restJson1StartThingRegistrationTaskCommand = deserializeA
15584
15584
  const deserializeAws_restJson1StartThingRegistrationTaskCommandError = async (output, context) => {
15585
15585
  const parsedOutput = {
15586
15586
  ...output,
15587
- body: await parseBody(output.body, context),
15587
+ body: await parseErrorBody(output.body, context),
15588
15588
  };
15589
15589
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15590
15590
  switch (errorCode) {
@@ -15624,7 +15624,7 @@ exports.deserializeAws_restJson1StopThingRegistrationTaskCommand = deserializeAw
15624
15624
  const deserializeAws_restJson1StopThingRegistrationTaskCommandError = async (output, context) => {
15625
15625
  const parsedOutput = {
15626
15626
  ...output,
15627
- body: await parseBody(output.body, context),
15627
+ body: await parseErrorBody(output.body, context),
15628
15628
  };
15629
15629
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15630
15630
  switch (errorCode) {
@@ -15667,7 +15667,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
15667
15667
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
15668
15668
  const parsedOutput = {
15669
15669
  ...output,
15670
- body: await parseBody(output.body, context),
15670
+ body: await parseErrorBody(output.body, context),
15671
15671
  };
15672
15672
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15673
15673
  switch (errorCode) {
@@ -15713,7 +15713,7 @@ exports.deserializeAws_restJson1TestAuthorizationCommand = deserializeAws_restJs
15713
15713
  const deserializeAws_restJson1TestAuthorizationCommandError = async (output, context) => {
15714
15714
  const parsedOutput = {
15715
15715
  ...output,
15716
- body: await parseBody(output.body, context),
15716
+ body: await parseErrorBody(output.body, context),
15717
15717
  };
15718
15718
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15719
15719
  switch (errorCode) {
@@ -15777,7 +15777,7 @@ exports.deserializeAws_restJson1TestInvokeAuthorizerCommand = deserializeAws_res
15777
15777
  const deserializeAws_restJson1TestInvokeAuthorizerCommandError = async (output, context) => {
15778
15778
  const parsedOutput = {
15779
15779
  ...output,
15780
- body: await parseBody(output.body, context),
15780
+ body: await parseErrorBody(output.body, context),
15781
15781
  };
15782
15782
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15783
15783
  switch (errorCode) {
@@ -15829,7 +15829,7 @@ exports.deserializeAws_restJson1TransferCertificateCommand = deserializeAws_rest
15829
15829
  const deserializeAws_restJson1TransferCertificateCommandError = async (output, context) => {
15830
15830
  const parsedOutput = {
15831
15831
  ...output,
15832
- body: await parseBody(output.body, context),
15832
+ body: await parseErrorBody(output.body, context),
15833
15833
  };
15834
15834
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15835
15835
  switch (errorCode) {
@@ -15881,7 +15881,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
15881
15881
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
15882
15882
  const parsedOutput = {
15883
15883
  ...output,
15884
- body: await parseBody(output.body, context),
15884
+ body: await parseErrorBody(output.body, context),
15885
15885
  };
15886
15886
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15887
15887
  switch (errorCode) {
@@ -15921,7 +15921,7 @@ exports.deserializeAws_restJson1UpdateAccountAuditConfigurationCommand = deseria
15921
15921
  const deserializeAws_restJson1UpdateAccountAuditConfigurationCommandError = async (output, context) => {
15922
15922
  const parsedOutput = {
15923
15923
  ...output,
15924
- body: await parseBody(output.body, context),
15924
+ body: await parseErrorBody(output.body, context),
15925
15925
  };
15926
15926
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15927
15927
  switch (errorCode) {
@@ -15958,7 +15958,7 @@ exports.deserializeAws_restJson1UpdateAuditSuppressionCommand = deserializeAws_r
15958
15958
  const deserializeAws_restJson1UpdateAuditSuppressionCommandError = async (output, context) => {
15959
15959
  const parsedOutput = {
15960
15960
  ...output,
15961
- body: await parseBody(output.body, context),
15961
+ body: await parseErrorBody(output.body, context),
15962
15962
  };
15963
15963
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
15964
15964
  switch (errorCode) {
@@ -16004,7 +16004,7 @@ exports.deserializeAws_restJson1UpdateAuthorizerCommand = deserializeAws_restJso
16004
16004
  const deserializeAws_restJson1UpdateAuthorizerCommandError = async (output, context) => {
16005
16005
  const parsedOutput = {
16006
16006
  ...output,
16007
- body: await parseBody(output.body, context),
16007
+ body: await parseErrorBody(output.body, context),
16008
16008
  };
16009
16009
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16010
16010
  switch (errorCode) {
@@ -16056,7 +16056,7 @@ exports.deserializeAws_restJson1UpdateBillingGroupCommand = deserializeAws_restJ
16056
16056
  const deserializeAws_restJson1UpdateBillingGroupCommandError = async (output, context) => {
16057
16057
  const parsedOutput = {
16058
16058
  ...output,
16059
- body: await parseBody(output.body, context),
16059
+ body: await parseErrorBody(output.body, context),
16060
16060
  };
16061
16061
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16062
16062
  switch (errorCode) {
@@ -16099,7 +16099,7 @@ exports.deserializeAws_restJson1UpdateCACertificateCommand = deserializeAws_rest
16099
16099
  const deserializeAws_restJson1UpdateCACertificateCommandError = async (output, context) => {
16100
16100
  const parsedOutput = {
16101
16101
  ...output,
16102
- body: await parseBody(output.body, context),
16102
+ body: await parseErrorBody(output.body, context),
16103
16103
  };
16104
16104
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16105
16105
  switch (errorCode) {
@@ -16145,7 +16145,7 @@ exports.deserializeAws_restJson1UpdateCertificateCommand = deserializeAws_restJs
16145
16145
  const deserializeAws_restJson1UpdateCertificateCommandError = async (output, context) => {
16146
16146
  const parsedOutput = {
16147
16147
  ...output,
16148
- body: await parseBody(output.body, context),
16148
+ body: await parseErrorBody(output.body, context),
16149
16149
  };
16150
16150
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16151
16151
  switch (errorCode) {
@@ -16212,7 +16212,7 @@ exports.deserializeAws_restJson1UpdateCustomMetricCommand = deserializeAws_restJ
16212
16212
  const deserializeAws_restJson1UpdateCustomMetricCommandError = async (output, context) => {
16213
16213
  const parsedOutput = {
16214
16214
  ...output,
16215
- body: await parseBody(output.body, context),
16215
+ body: await parseErrorBody(output.body, context),
16216
16216
  };
16217
16217
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16218
16218
  switch (errorCode) {
@@ -16270,7 +16270,7 @@ exports.deserializeAws_restJson1UpdateDimensionCommand = deserializeAws_restJson
16270
16270
  const deserializeAws_restJson1UpdateDimensionCommandError = async (output, context) => {
16271
16271
  const parsedOutput = {
16272
16272
  ...output,
16273
- body: await parseBody(output.body, context),
16273
+ body: await parseErrorBody(output.body, context),
16274
16274
  };
16275
16275
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16276
16276
  switch (errorCode) {
@@ -16316,7 +16316,7 @@ exports.deserializeAws_restJson1UpdateDomainConfigurationCommand = deserializeAw
16316
16316
  const deserializeAws_restJson1UpdateDomainConfigurationCommandError = async (output, context) => {
16317
16317
  const parsedOutput = {
16318
16318
  ...output,
16319
- body: await parseBody(output.body, context),
16319
+ body: await parseErrorBody(output.body, context),
16320
16320
  };
16321
16321
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16322
16322
  switch (errorCode) {
@@ -16368,7 +16368,7 @@ exports.deserializeAws_restJson1UpdateDynamicThingGroupCommand = deserializeAws_
16368
16368
  const deserializeAws_restJson1UpdateDynamicThingGroupCommandError = async (output, context) => {
16369
16369
  const parsedOutput = {
16370
16370
  ...output,
16371
- body: await parseBody(output.body, context),
16371
+ body: await parseErrorBody(output.body, context),
16372
16372
  };
16373
16373
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16374
16374
  switch (errorCode) {
@@ -16414,7 +16414,7 @@ exports.deserializeAws_restJson1UpdateEventConfigurationsCommand = deserializeAw
16414
16414
  const deserializeAws_restJson1UpdateEventConfigurationsCommandError = async (output, context) => {
16415
16415
  const parsedOutput = {
16416
16416
  ...output,
16417
- body: await parseBody(output.body, context),
16417
+ body: await parseErrorBody(output.body, context),
16418
16418
  };
16419
16419
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16420
16420
  switch (errorCode) {
@@ -16451,7 +16451,7 @@ exports.deserializeAws_restJson1UpdateFleetMetricCommand = deserializeAws_restJs
16451
16451
  const deserializeAws_restJson1UpdateFleetMetricCommandError = async (output, context) => {
16452
16452
  const parsedOutput = {
16453
16453
  ...output,
16454
- body: await parseBody(output.body, context),
16454
+ body: await parseErrorBody(output.body, context),
16455
16455
  };
16456
16456
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16457
16457
  switch (errorCode) {
@@ -16509,7 +16509,7 @@ exports.deserializeAws_restJson1UpdateIndexingConfigurationCommand = deserialize
16509
16509
  const deserializeAws_restJson1UpdateIndexingConfigurationCommandError = async (output, context) => {
16510
16510
  const parsedOutput = {
16511
16511
  ...output,
16512
- body: await parseBody(output.body, context),
16512
+ body: await parseErrorBody(output.body, context),
16513
16513
  };
16514
16514
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16515
16515
  switch (errorCode) {
@@ -16552,7 +16552,7 @@ exports.deserializeAws_restJson1UpdateJobCommand = deserializeAws_restJson1Updat
16552
16552
  const deserializeAws_restJson1UpdateJobCommandError = async (output, context) => {
16553
16553
  const parsedOutput = {
16554
16554
  ...output,
16555
- body: await parseBody(output.body, context),
16555
+ body: await parseErrorBody(output.body, context),
16556
16556
  };
16557
16557
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16558
16558
  switch (errorCode) {
@@ -16598,7 +16598,7 @@ exports.deserializeAws_restJson1UpdateMitigationActionCommand = deserializeAws_r
16598
16598
  const deserializeAws_restJson1UpdateMitigationActionCommandError = async (output, context) => {
16599
16599
  const parsedOutput = {
16600
16600
  ...output,
16601
- body: await parseBody(output.body, context),
16601
+ body: await parseErrorBody(output.body, context),
16602
16602
  };
16603
16603
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16604
16604
  switch (errorCode) {
@@ -16638,7 +16638,7 @@ exports.deserializeAws_restJson1UpdateProvisioningTemplateCommand = deserializeA
16638
16638
  const deserializeAws_restJson1UpdateProvisioningTemplateCommandError = async (output, context) => {
16639
16639
  const parsedOutput = {
16640
16640
  ...output,
16641
- body: await parseBody(output.body, context),
16641
+ body: await parseErrorBody(output.body, context),
16642
16642
  };
16643
16643
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16644
16644
  switch (errorCode) {
@@ -16687,7 +16687,7 @@ exports.deserializeAws_restJson1UpdateRoleAliasCommand = deserializeAws_restJson
16687
16687
  const deserializeAws_restJson1UpdateRoleAliasCommandError = async (output, context) => {
16688
16688
  const parsedOutput = {
16689
16689
  ...output,
16690
- body: await parseBody(output.body, context),
16690
+ body: await parseErrorBody(output.body, context),
16691
16691
  };
16692
16692
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16693
16693
  switch (errorCode) {
@@ -16736,7 +16736,7 @@ exports.deserializeAws_restJson1UpdateScheduledAuditCommand = deserializeAws_res
16736
16736
  const deserializeAws_restJson1UpdateScheduledAuditCommandError = async (output, context) => {
16737
16737
  const parsedOutput = {
16738
16738
  ...output,
16739
- body: await parseBody(output.body, context),
16739
+ body: await parseErrorBody(output.body, context),
16740
16740
  };
16741
16741
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16742
16742
  switch (errorCode) {
@@ -16806,7 +16806,7 @@ exports.deserializeAws_restJson1UpdateSecurityProfileCommand = deserializeAws_re
16806
16806
  const deserializeAws_restJson1UpdateSecurityProfileCommandError = async (output, context) => {
16807
16807
  const parsedOutput = {
16808
16808
  ...output,
16809
- body: await parseBody(output.body, context),
16809
+ body: await parseErrorBody(output.body, context),
16810
16810
  };
16811
16811
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16812
16812
  switch (errorCode) {
@@ -16861,7 +16861,7 @@ exports.deserializeAws_restJson1UpdateStreamCommand = deserializeAws_restJson1Up
16861
16861
  const deserializeAws_restJson1UpdateStreamCommandError = async (output, context) => {
16862
16862
  const parsedOutput = {
16863
16863
  ...output,
16864
- body: await parseBody(output.body, context),
16864
+ body: await parseErrorBody(output.body, context),
16865
16865
  };
16866
16866
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16867
16867
  switch (errorCode) {
@@ -16907,7 +16907,7 @@ exports.deserializeAws_restJson1UpdateThingCommand = deserializeAws_restJson1Upd
16907
16907
  const deserializeAws_restJson1UpdateThingCommandError = async (output, context) => {
16908
16908
  const parsedOutput = {
16909
16909
  ...output,
16910
- body: await parseBody(output.body, context),
16910
+ body: await parseErrorBody(output.body, context),
16911
16911
  };
16912
16912
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16913
16913
  switch (errorCode) {
@@ -16959,7 +16959,7 @@ exports.deserializeAws_restJson1UpdateThingGroupCommand = deserializeAws_restJso
16959
16959
  const deserializeAws_restJson1UpdateThingGroupCommandError = async (output, context) => {
16960
16960
  const parsedOutput = {
16961
16961
  ...output,
16962
- body: await parseBody(output.body, context),
16962
+ body: await parseErrorBody(output.body, context),
16963
16963
  };
16964
16964
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
16965
16965
  switch (errorCode) {
@@ -17002,7 +17002,7 @@ exports.deserializeAws_restJson1UpdateThingGroupsForThingCommand = deserializeAw
17002
17002
  const deserializeAws_restJson1UpdateThingGroupsForThingCommandError = async (output, context) => {
17003
17003
  const parsedOutput = {
17004
17004
  ...output,
17005
- body: await parseBody(output.body, context),
17005
+ body: await parseErrorBody(output.body, context),
17006
17006
  };
17007
17007
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
17008
17008
  switch (errorCode) {
@@ -17042,7 +17042,7 @@ exports.deserializeAws_restJson1UpdateTopicRuleDestinationCommand = deserializeA
17042
17042
  const deserializeAws_restJson1UpdateTopicRuleDestinationCommandError = async (output, context) => {
17043
17043
  const parsedOutput = {
17044
17044
  ...output,
17045
- body: await parseBody(output.body, context),
17045
+ body: await parseErrorBody(output.body, context),
17046
17046
  };
17047
17047
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
17048
17048
  switch (errorCode) {
@@ -17091,7 +17091,7 @@ exports.deserializeAws_restJson1ValidateSecurityProfileBehaviorsCommand = deseri
17091
17091
  const deserializeAws_restJson1ValidateSecurityProfileBehaviorsCommandError = async (output, context) => {
17092
17092
  const parsedOutput = {
17093
17093
  ...output,
17094
- body: await parseBody(output.body, context),
17094
+ body: await parseErrorBody(output.body, context),
17095
17095
  };
17096
17096
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
17097
17097
  switch (errorCode) {
@@ -21806,6 +21806,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
21806
21806
  }
21807
21807
  return {};
21808
21808
  });
21809
+ const parseErrorBody = async (errorBody, context) => {
21810
+ var _a;
21811
+ const value = await parseBody(errorBody, context);
21812
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
21813
+ return value;
21814
+ };
21809
21815
  const loadRestJsonErrorCode = (output, data) => {
21810
21816
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
21811
21817
  const sanitizeErrorCode = (rawValue) => {